Inspecting revisions

# inspect history visually
$ gitk # this opens a Tk window, and shows you how the revisions are connected
# inspect history
$ git log # this pipes a log of the current branch into your PAGER
$ git log -p # ditto, but append a patch after each commit message
# inspect a specific commit
$ git show HEAD # show commit info, diffstat and patch
# of the tip of the current branch

Referring to revisions

# by name
$ git log v1.0.0 # show history leading up to tag "v1.0.0"
$ git log master # show history of branch "master"
# relative to a name
$ git show master^ # show parent to last revision of master
$ git show master~2 # show grand parent to tip of master
$ git show master~3 # show great grand parent to tip of master (you get the idea)
# by output of "git describe"
$ git show v1.4.4-g730996f # you get this string by calling "git describe"
# by hash (internally, all objects are identified by a hash)
$ git show f665776185ad074b236c00751d666da7d1977dbe
$ git show f665776 # a unique prefix is sufficient
# tag a revision
$ git tag v1.0.0 # make current HEAD known as "v1.0.0"
$ git tag interesting v1.4.4-g730996f # tag a specific revision (not HEAD)