GitHubDev & Eng
Content type: Concept
4 min read
GitHub Enables Creation of Git Repositories with SHA-256 in Public Preview
- Reading
- 4 min
Since December 3, 2026, it has been possible to create repositories on GitHub using SHA-256 instead of SHA-1. The algorithm has existed in Git since 2020, but it's only now arriving on github.com, with no conversion for existing repositories.
GitHub announced on December 3, 2026 that SHA-256-based Git repositories entered public preview on github.com and on GitHub Enterprise Cloud with data residency. In practice, this means that when creating a new repository, you can now choose between SHA-1 (the historical default) and SHA-256 as the hash algorithm for Git's internal objects, whether through the web interface or through GitHub's REST API.
The feature itself isn't new to Git: support for SHA-256 has been available since version 2.30, released in December 2020. What changes now is that GitHub, the world's largest repository hosting platform, has finally brought this option to its platform's users, not just to those running Git locally or on their own infrastructure.
Why Switch from SHA-1
Git uses the hash of each object's content (commit, file tree, blob) as its identifier. This hash has always been generated with SHA-1, an algorithm the cryptographic community had considered weakened for years. The final blow came with the SHAttered attack, publicly demonstrated in 2017: researchers from Google and CWI Amsterdam produced two distinct PDF files with the same SHA-1 hash, proving that collisions were no longer just theoretical.
In a Git repository, a hash collision could theoretically allow two different objects (for example, a legitimate commit and a malicious one) to share the same identifier, opening the door to content-substitution attacks that tools relying only on the hash wouldn't detect. This isn't a daily risk for the average developer, but it's unacceptable for security audits, software supply chains, and regulated environments, where the integrity of code history is part of compliance.
Expert views
What people are saying about it.
Vercel's AI SDK update moves controls into the front-end that used to live only in the backend: correcting a running agent, recovering from an error mid-stream, and tracing a workflow that spans multiple processes in a single trace.
A test published on Planet PostgreSQL shows that REPACK (CONCURRENTLY) allows reading and writing during most of a table's reorganization. But there is a final moment when the lock returns, and it can take longer than it seems.
How It Works in Practice
The most visible change for SHA-256 users is the size of the object identifier: instead of SHA-1's 40 hexadecimal characters, commits now have 64 characters. Running git rev-parse HEAD on a SHA-256 repository returns a much longer hash, and that propagates to everything that references Git objects by ID.
The choice happens only when the repository is created:

- When creating a repository through the web interface or the API, you can select SHA-1 or SHA-256 as the hash algorithm;
- When cloning an existing repository, the local Git automatically adopts the same algorithm used in the remote repository, with no manual configuration required;
- there's no conversion afterward: GitHub makes clear that a repository's hash algorithm is set at creation and cannot be changed later. Existing repositories remain on SHA-1 forever.
This last restriction is the most important point for anyone evaluating adoption: there's no in-place migration path for existing projects. The decision only applies to new repositories, created from now on.
What Can Break in Tooling
This is why it took this option six years to move from Git's core to GitHub: a lot of tooling in the ecosystem assumes, directly or indirectly, that a Git object ID is exactly 40 hexadecimal characters long. CI scripts, integration bots, webhook parsers, and even regex validations embedded in internal systems can simply fail when faced with a 64-character hash.
GitHub's own changelog lists the points to watch before creating a SHA-256 repository:
- Make sure you're running Git 2.30 or newer, and confirm that other implementations used in the pipeline, such as libgit2, also support SHA-256;
- Update any tool that reads object IDs from API responses, webhooks, or other integrations to accept both 40- and 64-character IDs;
- Check a repository's hash algorithm via the REST API, using the dedicated endpoint for querying the repository's hash algorithm, before assuming any ID format in automations.
Teams that maintain deploy pipelines, code review bots, or custom integrations with the GitHub API have auditing work ahead of them before pointing any automation at a SHA-256 repository. That applies both to in-house code and to third-party dependencies that read commit SHAs as fixed-length strings.
When to Migrate and When to Wait
For a new project, with no history to preserve and no dependency on legacy integrations, adopting SHA-256 from the first commit is the most defensible choice from a long-term security standpoint: it completely avoids SHA-1's collision risk and already aligns the repository with Git's own direction, which will make SHA-256 the default for new repositories in version 3.0.
For a repository already in production, with years of history, established CI integrations, and external dependencies that read commit hashes as strings, the math is different. Since there's no conversion, migrating would mean recreating the repository from scratch, losing the continuity of GitHub's history (issues linked by SHA, links in documentation, releases) and validating every integration again. For most of these cases, the security gain still doesn't pay for the operational disruption, at least while SHA-256 remains in public preview, without guarantees of full stability.
A reasonable middle ground is to treat new repositories in sensitive areas (infrastructure as code, signing pipelines, secrets) as the first candidates for SHA-256, while the rest of the portfolio waits for the tooling ecosystem to mature its support for 64-character IDs. GitHub itself is asking for feedback from anyone testing the feature, in the community discussion dedicated to it, which suggests there's still room for adjustments before any eventual general availability.
Translated from the Brazilian Portuguese original · Read the original
Rails gets credentials:keys, batched Action Text, and Action Mailer without Active Job
The This Week in Rails bulletin from November 27, 2026 brings a command to audit secrets without revealing them, the end of a per-attachment query in Action Text, and an Action Mailer that no longer needs to drag Active Job along at boot.
