Git-2-SVN migration?

前端 未结 2 1694
無奈伤痛
無奈伤痛 2020-12-25 09:56

Yes, I know. Why would you want to migrate from Git to SVN?

Well I happen to be in a situation that I need to migrate a huge Git repo to Subversion! Here\'s one wor

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-25 10:00

    --- Edited after details added ---

    Did you do an empty initial commit to svn/trunk? If not, then it would explain why you get an error that it cannot be found in the history.

    The comments (in combination)

    The --prefix gives you remote tracking branches like "svn/trunk" which
    is nice because you don't get ambiguous names if you call your local
    branch just "trunk" then. 
    

    and

    Then get the hash of the empty trunk commit:
    

    Tends to imply that they made a svn/trunk commit to prevent svn conflict with a pre-existing trunk directory. If that is so, perhaps your only misstep is not committing a svn/trunk to be found later?

    --- Original post follows ---

    Have you tried this? dcommit won't work properly until you linearize your trunk (or branch) history.

    Please post the details of your attempted migration. While what you posted is a useful error message, it would be ten times more useful with the list of steps you used to arrive at that error.

提交回复
热议问题