Git · Senior · Question 7 of 76
What is Git moving to as an alternative to SHA-1, and why?
- 1MD5, because it's faster to compute
- 2Random IDs, because hashes leak file contents
- ✓Correct answer: SHA-256, because SHA-1 collisions became practical
Explanation
The SHAttered attack (2017) produced a SHA-1 collision. Git uses a hardened SHA-1 that detects known attacks and supports SHA-256 repositories, with interoperability still evolving.