Re: how to undo a git merge?

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

 



[ Did you reply off-list intentionally? ]

On Fri, Jul 11, 2008 at 02:07:44PM -0400, ff <ff@xxxxxxxxxx> wrote:
> thank you.
> 
> I did see the -m option in the revert man page. It talks about
> "parent" and I did
> not understand what that is. Is parent the commit id of the merge commit?
> 
> Thanks again!

http://www.kernel.org/pub/software/scm/git/docs/gitglossary.html#def_parent

A merge commit has two parents, but obviously only one of the was the
HEAD commit before the merge. So when you revert a merge, you need to
specify which which parent's tree should be the tree of the new HEAD.

For example, if you were on branch 'master' and you merged 'foo' to
master using 'git merge foo', and you want to revert that merge then you
need '-m 1'.

Attachment: pgp5tDwYvPH0B.pgp
Description: PGP signature


[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]

  Powered by Linux