Search code examples
gitconflictrebase

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


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?


Solution

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