Why does Git remember and use a conflict resolution from an aborted rebase without asking me?

霸气de小男生 提交于 2019-12-03 08:52:11

问题


I did a rebase on my branch foo

git rebase master

Did some conflict resolutions, then decided I didn't want to do it, and aborted.

git rebase --abort

All the branch log histories look normal. Now I want to start the same process again.

git rebase master

When git hits the first conflict that it hit the first time, it lists the files as in conflict just like it did before. BUT instead of marking up the conflict with <<<<< etc, it just shows the file in its state after I resolved the conflict the first time. This is interesting that it has this feature… but I actually want to resolve one of the conflicts differently, so I don't want it to remember and re-apply.

What exactly is going on here, and can I turn it off?


回答1:


You can use rerere's "forget" function to erase a remembered conflict resolution.




回答2:


use git checkout --conflict=merge -- your_file to get the version of the file with conflicts



来源:https://stackoverflow.com/questions/5096649/why-does-git-remember-and-use-a-conflict-resolution-from-an-aborted-rebase-witho

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!