How to resync git with svn tree?
Background
I'm adding some features to a project that uses subversion - I'm using git-svn to clone it to my local repository, git-svn rebase to keep with the recent changes in the official trunk and keep the history linear.
Recently I've forgot myself and made a few merges which messed my rebasing - long story short I needed to spend some time with cherry-pick to make the history linear again. After that 1 rebase went fine, but now trying to make git-svn rebase shows conflict between subversion commits from 2008 (about 700 commits back) even though history seems to be linear.
Question
You can reset your branch to a commit that is definitely sync-ed (some old one) and then do a rebase to synchronize.
To save the changes made locally, you might want to branch before (and cherry-pick the necessary changes from this new branch afterwatds)
git branch branch_with_my_changes
git reset --hard very_old_commit_that_is_synced
git svn rebase
链接地址: http://www.djcxy.com/p/7184.html
上一篇: git svn dcommit没有rebasing
下一篇: 如何使用svn树重新同步git?