6

I am currently having a merge conflict, normally I can just manually edit them. But now, my problem is the file is not showing any arrow/marker(>>>>, <<<<< and ====) in which I could be able to edit it.

The problem is that I perhaps have a lot of changes uncommited and also there is one newly-added file and one newly-created binary file.

How do I resolve this?

5

It sounds like you might have accidentally enabled the union merge driver for text files. Check for a file type with merge=union in any of these attributes file locations:

  • ".git/info/attributes" in the repository
  • ".gitattributes" in the repository
  • A file referenced by the core.attributesfile option (run git config --list)

From the gitattributes man page:

The attribute merge affects how three versions of a file are merged when a file-level merge is necessary during git merge, and other commands such as git revert and git cherry-pick.

...

Built-in merge drivers

There are a few built-in low-level merge drivers defined that can be asked for via the merge attribute.

text

Usual 3-way file level merge for text files. Conflicted regions are marked with conflict markers <<<<<<<, ======= and >>>>>>>. The version from your branch appears before the ======= marker, and the version from the merged branch appears after the ======= marker.

...

union

Run 3-way file level merge for text files, but take lines from both versions, instead of leaving conflict markers. This tends to leave the added lines in the resulting file in random order and the user should verify the result. Do not use this if you do not understand the implications.

1
  • The binary merge driver can produce the same problem. – user2845840 Nov 23 '16 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.