How to conclude your merge of a file?

GitMerge

Git Problem Overview


After I merged a file in Git I tried to pull the repository but error came up:

> You have not concluded your merge. (MERGE_HEAD exists)

How does one conclude a merge?

Git Solutions


Solution 1 - Git

Check status (git status) of your repository. Every unmerged file (after you resolve conficts by yourself) should be added (git add), and if there is no unmerged file you should git commit

Solution 2 - Git

Note and update:

Since Git1.7.4 (January 2011), you have git merge --abort, synonymous to "git reset --merge" when a merge is in progress.

But if you want to complete the merge, while somehow nothing remains to be added, then a crude rm -rf .git/MERGE* can be enough for Git to forget about the current merge.

Solution 3 - Git

The easiest solution I found for this:

git commit -m "fixing merge conflicts"
git push

Solution 4 - Git

I just did:

git merge --continue

At which point vi launched to edit a merge comment. A quick :wq and the merge was done.

Solution 5 - Git

If you encounter this error in SourceTree, go to Actions>Resolve Conflicts>Restart Merge.

SourceTree version used is 1.6.14.0

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMuaz Al-JarhiView Question on Stackoverflow
Solution 1 - GitMBOView Answer on Stackoverflow
Solution 2 - GitVonCView Answer on Stackoverflow
Solution 3 - Gituser3127648View Answer on Stackoverflow
Solution 4 - GitStanView Answer on Stackoverflow
Solution 5 - GitCebu CM SolutionsView Answer on Stackoverflow