Git History & Features
In this page:
History of Git
Linus Torvalds wrote Git in 2005 after the Linux kernel team lost access to their previous proprietary tool, and he needed something fast, secure against tampering, and fully distributed from day one. The whole system is built primarily in C with supporting shell scripts, prioritizing raw speed over convenience features.
Example: History of Git
git init
Speed and Performance
Because almost every Git operation -- viewing history, diffing files, creating a branch -- reads from your local disk instead of a remote server, there's no network round-trip slowing you down. That local-first design is what keeps large teams on platforms like cookiescursor.com productive even on a slow connection.
Example: Speed and Performance
git log
Data Integrity with SHA-1
Every file, directory tree, and commit in Git is identified by a SHA-1 hash: a 40-character fingerprint computed from its exact contents. Change even one byte and the hash changes completely, which means Git can detect any silent corruption or tampering in your project's entire history.
Example: Data Integrity with SHA-1
git hash-object file.txt
Lightweight Branching Model
A Git branch isn't a full copy of your project -- it's just a 41-byte file holding the hash of the commit it currently points to. That's why creating, switching, or merging dozens of branches costs almost nothing in time or disk space, unlike heavier version control systems.
Example: Lightweight Branching Model
git branch feature-x
cat .git/refs/heads/feature-x
The Staging Area
The staging area (also called the index) sits between your working files and your permanent history, acting like a prep table where you choose exactly which changes go into the next commit. This lets you build one clean, focused commit even when you've been editing several unrelated things at once.
Example: The Staging Area
git add file.txt
git status
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: