A Git commit ID is a 40 digits long SHA-1 hash, that can be abbreviated up to the shortest 4 digits version (7 by default).
In this note i am showing how to abbreviate the long hash to a short hash in Git and how to display the abbreviated hashes in the outputs of the git log and git show commands. (more…)