Get the latest tech news
How short can Git abbreviate? (2013)
How short can a Git hash be abbreviated? A full SHA-1 hash is 160 bits, 40 hex characters, which is a bit long to talk about and retype when you’re not just copy-pasting. Therefore most peo…
However, since hash functions like SHA-1 have approximately random distribution, you easily can and will run into the birthday problem at this level. As Linus noted in that second link, Git will now make sure that the abbreviated hashes it prints are currently long enough to be unique, but that’s no guarantee against future collisions. Finally, when you reference a Git hash for posterity, e.g. in another commit message, I’d recommend always using the full value.
Or read this on Hacker News