Git pull error always for a binary file

git

I finished a git push to a Bitbucket repository and in the Bitbucket account I found these update were done. But when I do a git pull in a production CentOS server, I got error below. Does anyone know the reason and how to fix it?

xxxx@VM02 sha-ferrero-kinder_201661]$ sudo git pull
[sudo] password for XXXX:
Password:

**warning: Cannot merge binary files: images/Win/WinDisney.png (HEAD vs. 80e984389135a54b8062497fb5c202efcc89fc57)
Auto-merging images/Win/WinDisney.png
CONFLICT (add/add): Merge conflict in images/Win/WinDisney.png
Automatic merge failed; fix conflicts and then commit the result.**

Detail shown in attachment:

enter image description here

Best Answer

The file in your working copy is still the copy from your current branch – in other words, it was not modified by the merge attempt. To resolve the conflict and keep this file:

$ git add WinDisney.png 
$ git commit –m “My commit message for the merge”

If you prefer to resolve the conflict using their copy, you need to get the version of the file from the branch you were trying to merge in:

$ git checkout --theirs -- WinDisney.png

Alternatively you can try:

git mergetool

It opens a GUI that steps you through each conflict, and you get to choose how to merge. Sometimes it requires a bit of hand editing afterwards, but usually it's enough by itself. It is much better than doing the whole thing by hand certainly.

(Note : git mergetool doesn't necessarily open a GUI unless you install one.

Related Question