Back
I need a plumbing command to print the commit message of one given commit - nothing more, nothing less.
Instead of plumbing, you could use:
git log --format=%B -n 1 <commit>
Which will do exactly what you want.
But if you need plumbing at any cause then you can use rev-list:
git rev-list --format=%B --max-count=1 <commit>
Note: The rev-list will also print out the commit sha in addition to the commit message.
Reference: https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---formatltformatgt
31k questions
32.8k answers
501 comments
693 users