# GitHub begins public preview support for SHA-256 Git repositories

> GitHub has begun supporting SHA-256 Git repositories in public preview on github.com and on GitHub Enterprise Cloud with data residency.

- **Publisher**: New Web Media
- **Section**: Tech
- **Published**: Dec 4, 2026, 03:57 KST (2026-12-03T18:57:26.921Z)
- **Updated**: 2026-12-03T18:59:39.334Z
- **Credit**: Edited by Seung Kim
- **Canonical URL**: https://newweb.media/en/a/261204-g7bbbw
- **Markdown URL**: https://newweb.media/en/a/261204-g7bbbw.md
- **Korean Original**: https://newweb.media/a/261204-g7bbbw

## Why it matters
- With SHA-1's weaknesses well known, users can now choose a more secure hash algorithm for new repositories.
- SHA-256 is set to become the default for new repositories from Git 3.0, so users can start checking their tools and integrations now.

## By the numbers
| Metric | Value | Change |
| --- | --- | --- |
| SHA-256 repository object ID length | 64 characters | — |
| SHA-1 repository object ID length | 40 characters | — |
| Minimum version supporting SHA-256 repositories | Git 2.30 | — |

## Key details
When creating a new repository, users can choose between SHA-1 and SHA-256 as the hash algorithm in the web interface or the GitHub API. When a repository is cloned, Git automatically applies the same algorithm as the GitHub repository. The algorithm cannot be changed after a repository is created, and existing repositories continue to use SHA-1.

## Context
Git has long used SHA-1 to identify objects. After cryptographic attacks such as the SHAttered attack exposed weaknesses in SHA-1, Git introduced SHA-256 repositories in version 2.30, released in December 2020. The environment in use must run Git 2.30 or later, and users should also check whether other Git implementations such as libgit2 support SHA-256 repositories. Tools that read object IDs from API responses, webhooks and similar sources must be updated to handle both 40-character and 64-character IDs. The algorithm a repository uses can be looked up through a REST API endpoint, and users can keep creating SHA-1 repositories if their environment is not ready.

## What's next
- Git 3.0 is released, making SHA-256 the default for new repositories.

## Key terms
- **SHA-256**: A hash function from the SHA-2 family set by the U.S. National Institute of Standards and Technology (NIST), which produces a 256-bit hash from its input.
- **SHAttered attack**: An attack that actually produced a collision in SHA-1, in which two different documents have the same hash value.
- **Data residency**: A approach in which data is stored and processed within a specific country or region.

## Primary Sources
- [GitHub changelog](https://blog.github.com/changelog/2026-12-03-sha-256-git-repositories-are-now-in-public-preview/)

---
Tags: GitHub, Git, SHA-256, security
