Re: How to say HEAD~"all the way back - 1"

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

 



Bill Lear <rael@xxxxxxxxxx> writes:

> Git "indexing" of commits has a way to "go back":
>
> % git diff HEAD~3
>
> Can I say "all the way back", or "all the way back - 1" somehow?

Sorry, there is no such shorthand, but you could obviously say:

	$ git rev-list --parents HEAD | grep -v ' '

A way to find the root commit seems to be one of the things
people new to git want at least once, once they start futzing
with the tool.  But I suspect that is only because they need
that information to see how the tool works (say "what different
output would I get out of 'git show $commit' for root and other
commits?"), and not because they need that information for any
real life use.

Really, what useful purpose does it serve for you to find out
the root commit, OTHER THAN being able to say "the development
history of this project starts at this commit"?

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