Q:

Git: 'git log' command with -l option

I have read 'Git Hooks' topic in Atlassian's Git Tutorial before. The text I have quoted in this topic:

Post-Commit
The post-commit hook is called immediately after the commit-msg hook.
  It can’t change the outcome of the git commit operation, so it’s used
  primarily for notification purposes.
The script takes no parameters and its exit status does not affect the
  commit in any way. For most post-commit scripts, you’ll want access to
  the commit that was just created. You can use git rev-parse HEAD to
  get the new commit’s SHA1 hash, or you can use git log -l HEAD to get
  all of its information.

Although I read -l option in git log man page, I don't understand git log command with -l option what it is. What is the git log with -l option?

A:

From the context of that paragraph, I think it means to say git log -1 HEAD. That is, the digit 1, not the letter l. This will return information about the most recent commit as the docs say.
jack in ~/projects/some_project on master
$ git log -1 HEAD
commit f54d65611fd30633e806f8bce83a56cff841d98e
Merge: d45b51b 1619b26
Author: Jack Bracken <my.email@foo.bar>
Date:   Tue Oct 4 17:27:57 2016 +0100

    Merge branch 'cleanup' into 'master'

    Use pooled redis. Tidy code according to rubocop recommendations.

    See merge request !18

As far as I can tell git log -l HEAD does nothing meaningful. This is most likely a mistake in their docs.

