All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: ff <ff@member.org>
Cc: git@vger.kernel.org
Subject: Re: how to undo a git merge?
Date: Fri, 11 Jul 2008 10:13:35 -0700 (PDT)	[thread overview]
Message-ID: <m34p6we43y.fsf@localhost.localdomain> (raw)
In-Reply-To: <fa7d16350807110916x689e316fr6bae01f28e2e1acb@mail.gmail.com>

ff <ff@member.org> writes:

> I have two git branches that stem from the same exact master branch.
> Many commits happened independently on these two branches overtime.
> Then, I inadvertently did a merge from one branch into another. The branch
> where I merged into now has mixed commits, and also a commit for the merge
> itself. I then had more commits added to the branch that I merged into.
> 
> Now I would like to revert the merge... what is the best way of doing that?
> I would like very much to use something like git-revert <merge_commit_id>
> But that does not seem to work.

If you have published history, then the only sane option is
"git revert -m".  If you haven't published history, you can
try "git rebase --interactive".

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  parent reply	other threads:[~2008-07-11 17:14 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
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 [this message]
     [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=m34p6we43y.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.