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?
threads / discuss / 43442
Subject: Re: git reset --soft a merged commit
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?
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. :-(
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