Auto merge failed; fix conflicts and then commit the result. [Git]

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
git pull
remote: Counting objects: 21, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 18 (delta 13), reused 0 (delta 0)
Unpacking objects: 100% (18/18), done.
From [email protected]:user/repo
251d91b..b1a4844 master -> origin/master
Auto-merged folder/file.ext
CONFLICT (content): Merge conflict in folder/file.ext
Automatic merge failed; fix conflicts and then commit the result.

You probably saw this message when you tried to do a git pull. There are a number of causes for this but the bottom line is that Git was unable to auto merge. If you know that the remote version is what you want then you can fix it by doing the following:

git fetch origin
git reset --hard origin

Now you can git push and pull to your heart’s content.

comments powered by Disqus