Re: git revert with partial commit.

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

 



Hongyi Zhao <hongyi.zhao@xxxxxxxxx> writes:

> Because the commit I want to revert is done a long time ago, which is
> not the parent of the commit I'm currently on, so I can't use the `~1`
> which indicates that I want to go back one commit from my current
> position.

You *can* use HEAD~1.  After the git revert, a new commit has been
created, and so HEAD~1 refers to the state of things before running git
revert.



[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