git - show the latest commit hash
December 12, 2024
I guess, there are more ways to accomplish this:
- See
git log --help
for all available--format=<format>
options.
git log --format="%H" | head -n 1
%H: commit hash
%h: abbreviated commit hash