开发者

Merging existing git branch with formerly unknown SVN

My project I am working on is version controlled under SVN. I had to do a large number of refactorings. For this purpose I took my workspace and created a new git repository. Afterwards I made the refactorings and committed to my 开发者_如何学Pythonlocal git repository as often as possible, made branches etc..

Meanwhile someone made commits to the SVN. Now I would like to commit my changes also into the SVN. Adding the SVN via git-svn clone doesnt help, because the clone and the existing branches cant be merged (missing common ancestor) even if the tracked files are the same.

Is there a possibility to add a SVN link and/or create this ancestor?


It's sort of a dirty hack in this instance, but if you smash all the commits down using rebase, you could probably just cherry-pick the consolidated change.

UPDATE: Also, you might try using rebase to move the root of the branch you did your refactoring on so that it branches from a branch that tracks the git-svn repo.

UPDATE 2: As ndim says, the rebase option you're looking for is probably --onto.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜