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