Specifying N revisions after the initial commit

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

 



Hi All,

Please CC me as I'm not subscribed.

I was hoping someone could help me with the revision shorthand to get
the commit sha of a commit N commits after the initial commit.  Thus
far I've figured out that to get the initial commit in a repository,
you can use:

git rev-list --max-parents=0 HEAD

but I can't figure out how to get "give me the commit sha1 of the
commit immediately after the initial commit", or for some number N.  I
could always do something like:

git rev-list HEAD | tail -2

to get both, but I was curious if there was a refspec shorthand for
this that could be used.  It seems that git's rev parsing is all built
on going backwards in order (and probably rightfully so).

Thanks in advance.

josh
--
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]