This is an old revision of the document!
Overview
A small sample of Git revisions; different ways to refer to commits (using Linux kernel source).
Basic Git revisions
HEAD (commonly the default) refers to the commit at the tip of the current branch:
$ git show $ git show HEAD
Commits are also reflected in branch or tag names:
$ git show master $ git show v4.16
And of course you can always use the full commit ID:
$ git show 0adb32858b0bddf4ada5f364a84ed60b196dbcda
You can use git rev-parse to map a reference to its underlying commit ID:
$ git rev-parse v4.16 3fb78e8be9d9428fbc4c016f8b031b01a6fdd63d $