Re: How to say HEAD~"all the way back - 1"
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 24, 2007, 09:30 UTC
- Message-ID
- <7virdrzyvp.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <17887.10938.419368.304761@lisa.zopyra.com>
Bill Lear <rael@zopyra.com> writes:
Show 9 quoted lines
> Exactly what I was after. Something like: > > % git diff HEAD~-1 > > or > > % git diff ^HEAD~0 > > whatever ...
<amusement>
$ git rev-parse HEAD~4096
fatal: ambiguous argument 'HEAD~4096': unknown revision or path ...
$ git rev-parse HEAD~2048
231af8322...
$ git rev-parse HEAD~3072
723c31fea...
$ git rev-parse HEAD~3584
....
$ git rev-parse HEAD_3952
e83c5163316f89bfbde7d9ab23ca2e25604af290</amusement>
If you somehow need to know where the root is all the time, you could do the above once and say:
$ git tag root-commit e83c5163316f89bfbde7d9ab23ca2e25604af290