gitmerge-conflict-resolutiongit-rerere

git conflict notation not showing


I received a conflict when trying to merge two files:

CONFLICT (content): Merge conflict in user.py

When I looked into user.py, there is no git-conflict-notation/mark that I was used to:

<<<<<<< HEAD
Hello world
=======
Hola mundo
>>>>>>>

What could be the problem?


Solution

  • My guess was you might have git-rerere enabled.

    This facility [re]cords [re]solutions to past conflicts. So next time you merge or rebase the same topic branch into a (very) similar (revision of) a branch, then git [re]members which conflict resolutions you picked and applies them for you.

    This is awesome if you use topic branches or frequent rebasing.

    However, should you need/prefer total control, disable it:

    git config rerere.enabled false