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

前端 未结 30 2207
离开以前
离开以前 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条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 03:42

    As another aside, the git-stash command is a godsend when trying to git with git-svn dcommits.

    A typical process:

    1. set up git repo
    2. do some work on different files
    3. decide to check some of the work in, using git
    4. decide to svn-dcommit
    5. get the dreaded "cannot commit with a dirty index" error.

    The solution (requires git 1.5.3+):

    git stash; git svn dcommit ; git stash apply
    

提交回复
热议问题