git svn处理冲突

来源: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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值