Git 2.29 ships experimental SHA-256 repositories
Git 2.29.0 completed the initial SHA-256 transition work, letting users create repositories that name objects with SHA-256 (git init --object-format=sha256). It was marked experimental and could not interoperate with SHA-1 repositories.
Background
Git's object names are SHA-1 hashes of content plus a type/length header, and commits are signed over those names, so collisions threaten signed tags and commits rather than Git's ability to detect accidental corruption. After SHAttered, Git first hardened SHA-1 (collision detection in 2.13), then designed a full hash transition. Git 2.42 (August 21, 2023) removed the 'experimental curiosity' warning, while noting interoperability with SHA-1 repositories was still missing.
Sources
- standardGit 2.29.0 release notesGit project, github.com
- standardGit 2.42.0 release notesGit project, github.com