All of lore.kernel.org
 help / color / mirror / Atom feed
* Specifying N revisions after the initial commit
@ 2015-09-22 18:32 Josh Boyer
  2015-09-22 18:40 ` Konstantin Khomoutov
  0 siblings, 1 reply; 7+ messages in thread
From: Josh Boyer @ 2015-09-22 18:32 UTC (permalink / raw)
  To: Git Mailing List

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-22 20:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-22 18:32 Specifying N revisions after the initial commit Josh Boyer
2015-09-22 18:40 ` Konstantin Khomoutov
2015-09-22 19:10   ` Josh Boyer
2015-09-22 19:55     ` Junio C Hamano
2015-09-22 20:11       ` Josh Boyer
2015-09-22 20:40         ` Theodore Ts'o
2015-09-22 20:42           ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.