开发者

Import Git repository with submodules into a Subversion repository

What is the best approach for importing a Git project with submodules into a Subversion repository?

Not sure if it matters, but the submodules are pointing to the Kohana core and module repositories on github. It would be nice if I could reference these external repositories in Subversion, but it'开发者_如何学运维s definitely not a requirement.

Thanks, Mike


To import git to svn:

  • Create a svn repo, in the standard format that you want imported into.
  • Associate your git repo with the svn one:

    git svn clone https://svn.com/new_svn_repo --stdlayout
    
  • Checkout the trunck and merge the master

    git checkout trunk
    git merge master
    
  • Send the objects to the svn

    git svn dcommit
    
  • Done!

I don't think there is a simple way to include submodules within this. You should probably manually add the svn repos svn externals


I would recommend to import the repository using SubGit. Look at this comment for instructions. Though it doesn't support submodules so far, I know no other tool that does. But it fits migration purposes better.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜