Print commit message of a given commit in git -
I need a plumbing command to print a committed message given to me - nothing, nothing less No.
This is not a "pipeline", but it will do exactly what you want:
$ git log - format =% b-n 1 < Commit & gt;
If you need a "pipeline" command, you can use rev-list
:
$ Git rev-list --format =% B - max-count = 1 & lt; Commit & gt;
Although rev-list
will also commit commit sha (on the first line) in addition to committed messages.
Comments
Post a Comment