GitHub said on Thursday, Dec 3, that Git repositories using SHA-256 are now in public preview on github.com and on GitHub Enterprise Cloud with data residency. When you create a repository, in the web interface or through the API, you can now pick SHA-1 or SHA-256 as its hash algorithm. Clones follow whatever the repository on GitHub uses, so there's nothing to check beforehand.1

The catch is that the choice is permanent: a repository's hash algorithm can't be changed after it's created, and existing repositories on GitHub stay on SHA-1. SHA-256 object IDs are 64 hexadecimal characters long instead of 40, so anything that reads commit or object IDs from API responses, webhooks or other sources has to handle both lengths. You need Git 2.30 or later, and other Git implementations in your toolchain, such as libgit2, have to support SHA-256 too. A REST endpoint reports which algorithm a repository uses.1

Git itself has supported SHA-256 repositories since version 2.30 in December 2020, after attacks such as SHAttered exposed weaknesses in SHA-1, and GitHub notes that SHA-256 will become the default for new repositories in Git 3.0.1 The preview arrives in a week when browsers and infrastructure providers are speeding up their own cryptography changes, including Chrome's March deadline for P-256 certificate authorities. The announcement doesn't mention GitHub Enterprise Server. For our GitHub spotlight this is a feature to watch through the preview, not a grade change.

Sources

  1. GitHub Changelog — SHA-256 Git repositories are now in public preview (Dec 3, 2026) — accessed Dec 4, 2026; official

Corrections: none so far. We fix errors in the open, note them here and on the corrections log. Spotted one? Email editors@software-lifecycle.com.