Trying to get svn2git working on Windows

前端 未结 3 696
孤城傲影
孤城傲影 2021-02-12 16:45

I\'m migrating an SVN repository over to Git. The git-svn command doesn\'t handle the branches and tags properly but I stumbled across a tool called svn2git which seems to resol

3条回答
  •  深忆病人
    2021-02-12 17:25

    If all you want to migrate from SVN is the trunk and it's commit history, you can easily do it with the following git commands:

    git svn init --prefix=svn/ --no-metadata --trunk=http://[svnHostName]/svn/[projectTrunkUrl] --no-minimize-url
    git svn fetch --log-window-size=4000
    

    Tadahhh! You have initialized your local git repository with all your SVN trunk repository history!

    Now you probably want to add a default remote and push:

    https://help.github.com/en/articles/adding-a-remote

    https://help.github.com/en/articles/pushing-to-a-remote

提交回复
热议问题