TLDR Web Dev · MISCELLANEOUS

HOW SHORT CAN GIT ABBREVIATE?

links.tldr.tech4 min read

Summary from the TLDR Web Dev newsletter

The default 7-character length of Git hashes can lead to collisions in large repos like the Linux kernel. This article analyzes the distribution of abbreviation lengths, finding that while most commits can use short abbreviations, a large number require longer ones (up to 11 currently). It recommends using at least 12 characters for large repositories and referencing full Git hashes if possible.