简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM