Note that there are some explanatory texts on larger screens.

plurals
  1. POgit merge not creating merge commit, no MERGE_HEAD
    primarykey
    data
    text
    <p>Using Git 1.8.1.2 on Linux, I have been working on two different branches based on <code>master</code> in parallel (call them A and B), and also created a third branch (call it M) which merges those two branches—so far with no non-merge commits of its own.</p> <p>After doing some work on one of the “primary” branches (A), I checked out the merge branch (<code>git checkout M</code>), verified that it already had everything in B (<code>git merge B</code> reports <code>Already up-to-date.</code>) , and so I <code>git merge A</code> to pull in the new work on A.</p> <p>Some merge conflicts are reported, which is expected. I edit the affected files to remove the conflict markers, then <code>git add</code> them. All looking normal so far.</p> <p>But then when I <code>git commit</code>, the commit message gives no indication of this being a merge. If I proceed, the resulting commit (in the M branch) looks like just a simple commit (atop my prior merge of A and B); <code>git show</code> does not report <code>Merge:</code> parents. Prior to the commit, <code>.git</code> contains <code>MERGE_MODE</code> (empty) but there is no <code>MERGE_HEAD</code>.</p> <p>I am not using any special merge strategy, so I suppose the default (<code>recursive</code>) is being used. Anyway this does not look like a strategy problem: the contents of the working tree appear exactly like I would expect them to.</p> <p>If I manually create <code>MERGE_HEAD</code> with the hash of the head of A before committing, the resulting commit looks normal e.g. in <code>gitg</code>, though of course this makes me a little nervous.</p> <p>What could be going on? Is this a bug in Git—is there ever any reason for <code>MERGE_HEAD</code> not be created after <code>git merge</code> command which did not create a commit? 1.8.4.3 appears to have the same behavior.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload