开发者

How do I import one specific SVN branch to a git repository?

开发者 https://www.devze.com 2023-01-06 13:30 出处:网络
We recently moved from SVN to Git, but there\'s a single legacy branch that I need to bring in to the Git repository. The SVN and Git repositories are the same logical code (i.e. they\'re both called

We recently moved from SVN to Git, but there's a single legacy branch that I need to bring in to the Git repository. The SVN and Git repositories are the same logical code (i.e. they're both called foo-lib), but the Git one has newer revisions from after we switched to Git.

Is there a way we can use git-svn to grab the history of a specific branch开发者_开发问答 and graft it into the history of the git tree?


Based on VonC's comment, I took a look at this question and did something like:

git svn clone -A ~/.git/svn.authors http://svn/branches/foo svn-foo
git clone git@git:blah/foo.git new-foo
cd new-foo
git pull ../svn-foo :old-foo
0

精彩评论

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

关注公众号