Search code examples
gitmerge-conflict-resolutiongit-merge-conflict

Strangely closing diff sections in git conflict


After performing git pull --rebase origin master from my branch I got a conflict in some file that looks like this:

<<<<<<< 640da0acfa7e7bff40009acf1e5b0eccfae97637                                                                                                                                                          
        def some_func(some_arg):
            some_code                                                                                                                                             

=======                                                                                                                                                                                                   
<<<<<<< ca49b7324540347ba8823072feaa1bd23a5be97d                                                                                                                                                          
>>>>>>> name_of_my_last_commit_on_that_branch

These sections don't seem to close properly. There are no more <<<<<<, ====== or >>>>>> in this file. How should I think about it? Is it a bug or some feature that I am not aware of?

I am using git 2.21.0.

EDIT: I am sure that on branches' HEADs there are no left conflict markers.


Solution

  • It looks like you had a conflict marker committed in a previous commit. You might see it if you run git log -p.