How do I migrate an SVN repository with history to a new Git repository?

前端 未结 30 1997
离开以前
离开以前 2020-11-22 02:51

I read the Git manual, FAQ, Git - SVN crash course, etc. and they all explain this and that, but nowhere can you find a simple instruction like:

SVN repository in: <

30条回答
  •  春和景丽
    2020-11-22 03:37

    Converting svn submodule/folder 'MyModule' into git with history without tags nor branches.

    • git svn clone --no-metadata --trunk=SomeFolder1/SomeFolder2/SomeFolder3/MyModule http://svnhost:port/repo_root_folder/MyModule_temp -A C:\cheetah\svn\authors-transform.txt
    • git clone MyModule_temp MyModule
    • cd MyModule
    • git flow init
    • git remote set-url origin https://userid@stashhost/stash/scm/xyzxyz/MyModule.git
    • git push -u origin master
    • git push -u origin develop

    To retain svn ignore list use the above comments after step 1

提交回复
热议问题