News · GitHub (Microsoft) · 2 min read
Event date: · Published:
GitHub puts SHA-256 Git repositories into public preview
GitHub has opened a public preview that lets new repositories use SHA-256 object hashing instead of SHA-1, available on github.com and GitHub Enterprise Cloud including data-residency regions.
GitHub announced on December 3, 2026, in a post on its changelog, that SHA-256 Git repositories are now in public preview. The change lets new repositories use SHA-256 object hashing instead of SHA-1, as described in GitHub's changelog post announcing the preview.
What the public preview changes
- The public preview is available on github.com and GitHub Enterprise Cloud, including data-residency regions
- The hash algorithm, SHA-1 or SHA-256, is chosen when a repository is created and cannot be changed afterward
- Using SHA-256 requires Git 2.30 or later, which was released in December 2020
- SHA-256 object IDs are 64 hexadecimal characters long, compared with 40 characters for SHA-1
- Existing repositories stay on SHA-1 and are not affected by the preview
- GitHub added a new REST API endpoint that lets developers check which hash algorithm a repository uses
Why GitHub is moving away from SHA-1
The shift addresses known collision weaknesses in SHA-1 that were exposed by the 'SHAttered' attack. SHA-256 is also set to become Git's default hash algorithm in the upcoming Git 3.0 release, so GitHub's preview gives teams an early path to the algorithm Git itself is moving toward.
What it means for people building with AI
For builders, this is the first concrete path for new GitHub repositories to move off SHA-1. As adoption grows, CI systems, Git clients, and the SCM integrations used by coding-agent tooling will need to account for SHA-256 repositories alongside existing SHA-1 ones, including checking a repository's hash algorithm through GitHub's new API endpoint before assuming SHA-1.
Sources
- SHA-256 Git repositories are now in public preview (GitHub, December 3, 2026, official)
Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.