From: Jakub Narebski Date: Fri, 11 Jul 2008 18:36:12 GMT Subject: Re: how to undo a git merge? Message-ID: <200807112036.13745.jnareb@gmail.com> In-Reply-To: ff (?) wrote: > > 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? It is _number_ of parent. -m parent-number, --mainline parent-number Usually you cannot revert a merge because you do not know which side of the merge should be considered the mainline. This option speci- fies the parent number (starting from 1) of the mainline and allows revert to reverse the change relative to the specified parent. Merge commit has more than one parent. What git-revert does, it creates commit which reverts the changes, as if applying "reversal" diff, "git diff -R ^ ". -- Jakub Narebski Poland