I've got a script that needs to reference the initial commit in a repository. git has the special reference HEAD
, but doesn't have the corresponding TAIL
. I cannot find anything in git help rev-parse
that would seem to help me.
Here's what I'd like to do:
git show TAIL
Here's one option I have:
git show `git log --reverse | if read a commit ; then echo $commit ; fi`
That's pretty hacky and depends on the output of git log not changing.
Right now I just tag the initial commit and use that as my refspec. However, I'd like to release a general tool, so that's not a great option.
Thanks for any help