Sunday, May 18, 2014

How to fix GIT error: You have not concluded your merge (MERGE_HEAD exists)

GIT Error message:
You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you can merge.

Cause: Your previous merge was failed to merge automatically and went to conflict state. And you tried to pull again before resolving the conflict.
Solution: Undo the merge and perform the merge again properly.
Steps:
1) 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]
2) Resolve the conflict.
3) Don't forget to add and commit the merge.
4) git pull now should work fine.

Please let me know, if it's still not working. Thanks.

Link to my SO post: http://stackoverflow.com/a/11647899/1365319