git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Vajna <vmiklos@frugalware.org>
To: ff <ff@member.org>
Cc: git@vger.kernel.org
Subject: Re: how to undo a git merge?
Date: Fri, 11 Jul 2008 20:14:13 +0200	[thread overview]
Message-ID: <20080711181413.GI10347@genesis.frugalware.org> (raw)
In-Reply-To: <fa7d16350807111107o40c5cbb5xc06c3c56b16b7499@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 771 bytes --]

[ 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'.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2008-07-11 18:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11 16:16 how to undo a git merge? ff
2008-07-11 16:19 ` Miklos Vajna
     [not found]   ` <fa7d16350807111107o40c5cbb5xc06c3c56b16b7499@mail.gmail.com>
2008-07-11 18:14     ` Miklos Vajna [this message]
2008-07-11 18:46       ` ff
2008-07-11 18:53         ` Miklos Vajna
2008-07-11 18:55         ` Sverre Rabbelier
2008-07-11 17:13 ` Jakub Narebski
     [not found]   ` <fa7d16350807111108y3a8a7c3di19598a56dbbcdc15@mail.gmail.com>
2008-07-11 18:36     ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080711181413.GI10347@genesis.frugalware.org \
    --to=vmiklos@frugalware.org \
    --cc=ff@member.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).