Re: how to undo a git merge?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <revision>^<parent-number> <revision>".

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux