# Re: git reset --soft a merged commit

3 messages from 2006-11-06 to 2006-11-06. Participants: Shawn Pearce, Nguyen Thai Ngoc Duy, Jakub Narebski.
Thread: https://gitlist.dev/t/43442

## Nguyen Thai Ngoc Duy, 2006-11-06 04:48

Subject: git reset --soft a merged commit
Message-ID: <fcaeb9bf0611052048r11816e76p88d568e3478c354b@mail.gmail.com>
URL: https://gitlist.dev/e/fcaeb9bf0611052048r11816e76p88d568e3478c354b%40mail.gmail.com

```
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, 2006-11-06 04:50

Subject: Re: git reset --soft a merged commit
Message-ID: <20061106045038.GA22985@spearce.org>
URL: https://gitlist.dev/e/20061106045038.GA22985%40spearce.org
In-Reply-To: <fcaeb9bf0611052048r11816e76p88d568e3478c354b@mail.gmail.com>

```
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, 2006-11-06 09:01

Subject: Re: git reset --soft a merged commit
Message-ID: <eimtkj$bkv$1@sea.gmane.org>
URL: https://gitlist.dev/e/eimtkj%24bkv%241%40sea.gmane.org
In-Reply-To: <fcaeb9bf0611052048r11816e76p88d568e3478c354b@mail.gmail.com>

```
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


```
