Trying to get svn2git working on Windows

前端 未结 3 695
孤城傲影
孤城傲影 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:15

    I'd suggest you to try SubGit tool. It does translate Subversion tags as tags and works well on Windows (requires Java 5 or newer). SubGit is ready to use. You may get latest build at download page and read documentation on the web site.

    Originally in 2012 early SubGit versions required local access to Subversion repository (over file system) but later on (by 2015) on network access to subversion was added.

    Disclaimer: I'm SubGit developer.

    0 讨论(0)
  • 2021-02-12 17:16

    Obviously, rubygems.rb is missing. Install it as documented here:
    https://rubygems.org/pages/download

    Then, install svn2git as instructed here:
    https://github.com/nirvdrum/svn2git

    After that, everything shall be fine.

    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题