You have not concluded your merge (MERGE_HEAD exists)
The problem is your previous pull failed to merge automatically and went to conflict state. And the conflict wasn't resolved properly before the next pull.
- Undo the merge and pull again.
To undo a merge:
git merge --abort
[Since git version 1.7.4]
git reset --merge
[prior git versions]
Resolve the conflict.
Don't forget to add and commit the merge.
git pull
now should work fine.
I think it's worth mentioning that there are numerous scenarios in which the message You have not concluded your merge (MERGE_HEAD exists)
could occur, because many people have probably arrived at this page after searching for said message. The resolution will depend on how you got there.
git status
is always a useful starting point.
If you've already merged the contents to your satisfaction and are still getting this message, it could be as simple as doing
git add file
git commit
But again, it really depends on the situation. It's a good idea to understand the basics before attempting anything (same link Terence posted): Git - Basic Merge Conflicts
I think this is the right way :
git merge --abort
git fetch --all
Then, you have two options:
git reset --hard origin/master
OR If you are on some other branch:
git reset --hard origin/<branch_name>
If you are sure that you already resolved all merge conflicts:
rm -rf .git/MERGE*
And the error will disappear.