Why Git? History, Architecture & Core Benefits
Why Git? History, Architecture & Core Benefits
To truly master Git, one must understand its origin and why its creator, Linus Torvalds, designed it differently from every version control tool that preceded it. Git was built not just to track code, but to handle one of the largest, most complex open-source projects on earth: the Linux Kernel.
1. The Origin Story of Git
In 2002, the Linux Kernel development team used a proprietary distributed VCS called BitKeeper. In 2005, the relationship between BitKeeper's parent company and the Linux community broke down, revoking free access.
Faced with no existing open-source tool capable of meeting their performance and distributed workflow needs, Linus Torvalds took a temporary leave from kernel development in April 2005. Within weeks, he engineered and released the first operational version of Git.
Linus Torvalds' Core Design Goals:
- 1Speed & Scalability: Patching and committing must take milliseconds, even on a project with hundreds of thousands of files.
- 2Non-linear Development: Massively parallel branching and merging without server bottlenecks.
- 3Data Integrity (Cryptographic Hashing): Content cannot be modified or corrupted without Git detecting it instantly.
- 4Complete Distribution: No single point of failure; high resistance to network latency.
2. Snapshots, Not Deltas: Git's Fundamental Paradigm
Most legacy VCS systems (such as CVS, Subversion, and RCS) think of information as a list of file-based changes (deltas):
Git does not store deltas! Git thinks of its data as a stream of snapshots over time:
3. Cryptographic Integrity: SHA-1 & Object Hashing
Everything in Git is checksummed before it is stored and is then referred to by that checksum. This means it is impossible to change the contents of any file or directory without Git knowing about it:
- Git uses a cryptographic hash function (historically SHA-1, transitioning to SHA-256).
- A SHA-1 hash is a 40-character hexadecimal string calculated from the raw file contents and header:
- If even a single comma or whitespace character changes, the hash completely changes. This guarantees that your history cannot be silently tampered with or corrupted by disk failures.
4. Key Pillars of Git's Industry Dominance
- 1Performance: Nearly all operations are local. Running
git diffagainst code from 6 months ago takes 0.05 seconds because the entire repository history is stored locally in.git. - 2Branching as a Daily Tool: In other VCSs, branching was viewed as a heavy architectural event. In Git, branches are used for every 15-minute bugfix or experiment.
- 3Open-Source Standard: Over 95% of active software projects globally rely on Git and Git-based hosts (GitHub, GitLab, Bitbucket).
Practice Quiz
git log) in Git vastly faster than in Subversion (SVN)?The Three Trees: Working Directory, Staging Area & Git Repository
Continue learning with hands-on practice, examples, and exercises in the upcoming topic.
Related Lessons
Practice Quiz
Test your understanding of this lesson with 5 questions. Each question has one correct answer.