threads / discuss / 43442

Re: git reset --soft a merged commit

Subject: Re: git reset --soft a merged commit

## tl;dr

3 messages between Nov 6, 2006 and Nov 6, 2006.

replies: 2people: 3as markdown or json

Nguyen Thai Ngoc Duy· Nov 6, 2006, 04:48 UTC · lore

git reset --soft a merged commit

Hi, I did "git reset --soft HEAD~1" where HEAD is a merged commit and committed again (nothing changed). The new commit was not recorded as a merged commit. Is it intentional?

Shawn Pearce· Nov 6, 2006, 04:50 UTC · re: Nguyen Thai Ngoc Duy · lore
Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> Hi,
> I did "git reset --soft HEAD~1" where HEAD is a merged commit and
> committed again (nothing changed).  The new commit was not recorded as
> a merged commit. Is it intentional?
Yes, you undid the merge.  :-(
Jakub Narebski· Nov 6, 2006, 09:01 UTC · re: Nguyen Thai Ngoc Duy · lore
Nguyen Thai Ngoc Duy wrote:
> I did "git reset --soft HEAD~1" where HEAD is a merged commit and
> committed again (nothing changed).  The new commit was not recorded as
> a merged commit. Is it intentional?

Yes, you have chosen to go back to 1st parent. The information about other parents got lost.

If you want to correct commit, even if it is merge commit, use
  git commit --amend
instead.
Or you can muck with MERGE_HEAD instead.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

← back to recent threads