Re: how to undo a git merge?
> [ Did you reply off-list intentionally? ]
ooops... yes... I'm scared of the reply-all button. :)
> 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'.
Ok, so... sorry for not getting it completely, even after reading the info.
In your example, how and why you can determine that the number 1 represents the "foo" branch? Would "-m 2" represent the master branch? In your example is there any other choice for the "-m" number to use?
-- ff
On Fri, Jul 11, 2008 at 2:14 PM, Miklos Vajna <vmiklos@frugalware.org> wrote:
Show 21 quoted lines
> [ Did you reply off-list intentionally? ]
>
> On Fri, Jul 11, 2008 at 02:07:44PM -0400, ff <ff@member.org> 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'.
>