来源:http://stackoverflow.com/questions/112839/how-to-resolve-a-conflict-with-git-svn
After some googling I found a good answer on Larry's blog (Thanks Larry):
While doing a "git svn rebase", if you have merge conflicts here are some things to remember:
- While doing a rebase, if anything bad happens, you end up on a "(no-branch)" branch.
- When doing a "git status", you'll see a ".dotest" file in your working directory. Just ignore it.
- If you want to bail, do a "git rebase --abort". (Note there is no "git svn rebase --abort".)
- Fix the merge conflict file manually, then do a "git add [file]".
- Next do a "git rebase --continue". (Note there's no "svn" version of this either.)
- If it complains about "did you forget to call 'git add'?", then evidently your edit turned the conflict into a no-op change. Do a "git rebase --skip" to skip it. (Very weird, but true.)
- Rinse and repeat until the lather is gone, your scalp silky smooth, and the rebase is complete. At any time you can "git rebase --abort" to bail.
翻译成中文就是:
从Larry's博客上找到的
当我们使用“git svn rebase”合并产生冲突是,我们应该记住下面这些:
- 在rebase时,发生了任何事情我们都处在“(no-branch)”中(rebase时,不管发生了什么事情都没有在一个有效的分支中);
- 使用git status查看项目,如果发现了一个".dotest"文件,就忽视它;
- 如果你想终止合并,使用"git rebase --abort";
- 手动修复完冲突文件,记得使用"git add"加入被修复的文件;
- 然后使用"git rebase --continue"继续更新;
- 如果有提示说“did you forget to call 'git add'?”,而实际的冲突你已经处理。那么你使用“git rebase --abort”来跳过他。
- 重复上面步骤,直到rebase完成。在任何时候你都可以使用“git rebase --abort”来终止操作。
PS
git-svn官方参考:http://git-scm.com/docs/git-svn