Skip to content

Instantly share code, notes, and snippets.

@sullust
Created August 14, 2012 22:23
Show Gist options
  • Save sullust/3353530 to your computer and use it in GitHub Desktop.
Save sullust/3353530 to your computer and use it in GitHub Desktop.
pint git commit message from single commit
It's not "plumbing", but it'll do exactly what you want:
$ git log --format=%B -n 1 <commit>
If you absolutely need a "plumbing" command (not sure why that's a requirement), you can use rev-list:
$ git rev-list --format=%B --max-count=1 <commit>
Although rev-list will also print out the commit sha (on the first line) in addition to the commit message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment