简体   繁体   中英

What's the best way import only a few branches' history when switching from SVN to Git?

We have a huge SVN repository for which we only care about a few branches' history. Is there a clean way to import the history for just these few branches? Mainly, we're trying to avoid the incredible amount of time it would take to import the entire repository if we're really only going to keep a subset of history when it's all said and done.

svndump | svnfilter

阅读两者的手册页。

You can use paths when doing your git-svn set up: ie if you there is only one directory within the subversion repository that you want, you could use:

git svn clone http://svn.example.com/project/branches/interesting

rather than:

git svn clone http://svn.example.com/project/

svn-all-fast-export uses the fast-import format to stream repository contents, and is quite flexible. Run it locally on the machine that hosts the repositories.

svneverever can be useful to check that there aren't any subprojects you missed, since svn can get pretty freeform with branches-as-subtrees.

More tools here .

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