简体   繁体   中英

Migrating a svn repo to git. Multiple app in svn repo need to broken into separate git repos

I have a svn repo with various apps as subdirectory of a single svn repo. That worked because I could have checked out a partial, repo. As I cant do that with git obviously I need multiple repos. I want to keep my commit histories in the git export. What is the simplest way to do this?

You dont need to specify the root directory for cloning. You can do it like this:

git svn clone svn://repository/subdirectory_of_app1 app1
git svn clone svn://repository/subdirectory_of_app2 app2
...

If you have trunk/branches/tags folders in each of the app folders, you can also add additional arguments:

git svn clone svn://repository/subdirectory_of_app1 -T trunk -t tags -b branches app1
...

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