---
answer: direct
beat: system-design
source: 1 article · updated: August 15, 2026
---

Why did Git migrate from SHA-1 to SHA-256?

SHA-1 produces 160-bit hashes with a known collision weakness. After 30+ years, collision attacks became practical, posing a theoretical integrity risk for very large repositories. SHA-256 provides 256-bit output with no known practical collisions, offering decades of safety. Git's migration is gradual to avoid breaking existing workflows.

Answered in

Merkle Trees: How Git Detects Changes in Milliseconds

Git hashes files into nested cryptographic trees to skip unchanged directories in one comparison, finding changes across millions of files faster than scanning.

Crashtech Editorial August 15, 2026 System Design

Read the full analysis

Other questions this article answers

More system design questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the System Design beat.