Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to conclude your merge of a file?

Tags:

git

merge

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?

like image 208
Muaz Al-Jarhi Avatar asked Jan 21 '10 21:01

Muaz Al-Jarhi


People also ask

How do you conclude a merge?

After a git merge stops due to conflicts you can conclude the merge by running git merge --continue (see "HOW TO RESOLVE CONFLICTS" section below). Commits, usually other branch heads, to merge into our branch.

How do you fix you have not concluded your merge?

The problem for the "You have not concluded your merge (merge_head exists)" message is that previous pull was failed to merge automatically and went into conflicted state. The solution is to undo the merge and pull again.

Do I need to commit after merge?

yes ..you need to commit MERGE STATEMENT.


5 Answers

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

like image 123
MBO Avatar answered Nov 07 '22 11:11

MBO


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.

like image 20
VonC Avatar answered Nov 07 '22 10:11

VonC


The easiest solution I found for this:

git commit -m "fixing merge conflicts"
git push
like image 30
user3127648 Avatar answered Nov 07 '22 12:11

user3127648


I just did:

git merge --continue

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

like image 25
Stan Avatar answered Nov 07 '22 12:11

Stan


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

SourceTree version used is 1.6.14.0

like image 25
Cebu CM Solutions Avatar answered Nov 07 '22 11:11

Cebu CM Solutions