Search code examples
gitmergeparentgit-mergemintty

Git : Find (future) parent of ongoing merge


I have an ongoing merge which I did not finish - the repo is still in "MERGING" status, the MERGE_HEAD file exists. I now do not know anymore which revisions it is that I am trying to merge - well, via git log I know the name of the revision and branch that I am on, so I know that parent - but it's the other (future) parent I'm missing.

Of course the command history in my console is not long enough to still contain the git merge command I used - it's long forgotten.

git status only tells me : "All conflicts fixed but you are still merging.".


Solution

  • The MERGE_HEAD file contains the answer in plain fact. In fact, it contains only that.

    If any git command exists to show its content from the console, I'd be glad to know and would distribute points.