Re: how to undo a git merge?
- From
Miklos Vajna <vmiklos@frugalware.org>
- Date
- Jul 11, 2008, 16:19 UTC
- Message-ID
- <20080711161923.GE10347@genesis.frugalware.org>
- In-Reply-To
- <fa7d16350807110916x689e316fr6bae01f28e2e1acb@mail.gmail.com>
On Fri, Jul 11, 2008 at 12:16:15PM -0400, ff <ff@member.org> wrote:
> 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.
git revert has a '-m' option to revert merges. See the manpage.
> Any help/pointers of an example illustrating solution to this case > would be greatly > appreciated!
Actually if you just did that merge by accident, then probably you want 'git reset --hard HEAD^', not git revert, I think.