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:
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:
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:
Alternatively you can try:
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.