Tuesday, January 8, 2019

SOURCETREE error: You have not concluded your merge (MERGE_HEAD exists)

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="C:/Users/shankarj/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/GIT-CR~1.EXE" fetch origin

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="C:/Users/shankarj/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/GIT-CR~1.EXE" pull --no-commit origin develop


error: You have not concluded your merge (MERGE_HEAD exists).


hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.


Completed with errors, see above.


SOLUTION:
----------------

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.



Some useful links:
https://www.codementor.io/citizen428/git-tutorial-10-common-git-problems-and-how-to-fix-them-aajv0katd

https://blog.froiden.com/5-git-tricks-for-everyday-use-98139ab1569e

https://medium.com/@porteneuve/30-git-cli-options-you-should-know-about-15423e8771df

2 comments:

Samir Savsani said...
This comment has been removed by the author.
Samir Savsani said...

I would suggest to read article on below mentioned link, it was helpful to me.
you have not concluded your merge (merge_head exists) + "askforprogram"

Delphi Thread Example

Delphi Thread Example Threads mean a lot with the latest computer technology. They allow you to perform multiple tasks at the same time ...