[BUG?] git checkout -b removes MERGE_HEAD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I am not sure whether it is a bug or not, but it definitely did
surprise me a lot. The use-case was as follows:

 - I checked out master and ran a merge from branch (let's call
   it "branch"). It had a lot of conflicts, so I needed to test
   the result well.
 - During the testing I found a problem, but it may have already
   existed on master before the merge.
 - Therefore I needed to return to clean master, test it and return
   to the merge. So I thought I'd commit the merge to a temporary
   branch, test master again and merge the temporary to master if
   the problem is not from the merge. So I did:

   $ git checkout -b temp
   $ git commit

   OOPS! It forgot it was a merge.

Yes, I could have simply commited to master and reset --hard it
back. But I didn't expect it to forget it was a merge in the first
place. After all, it does NOT touch the index nor the working tree,
so why should it clear the MERGE_HEAD and MERGE_MSG?

So should this behaviour be changed?

Thanks,
Jan

-- 
                                        - Jan Hudec <bulb@xxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]