Are you done with an empty merge (two parents) or just with an empty commit? In the latter case, you could remove .git/MERGE_HEAD .
Update: Instead of manually deleting MERGE_HEAD , you can also use git merge --abort ( from git 1.7.4 ) or git reset --merge ( from git 1.6.2 ).
It's also worth mentioning that, at least from git 1.8.3 (maybe earlier?), You should see a status message like this if the actual merge is in progress and needs to be committed (if you specified --no-commit , e.g. ):
# On branch master
If you do not see this and still receive a MERGE_HEAD warning, something is confused, and you should probably just --abort back to its pure state.
Additional information from comments
During git merge, a MERGE_HEAD file is created in the root of the .git folder (next to HEAD, ORIG_HEAD, probably FETCH_HEAD, etc.) to track information about the current merge (in particular, SHA (s) commit (s) that merge into current HEAD). If you remove this, git will no longer think about merging. Obviously, if the merge is actually running, you will not want to delete this file.
dahlbyk Feb 04 '12 at 19:15 2012-02-04 19:15
source share