Introduction
Git is a distributed version control system originally created by Linus Torvalds in 2005 for Linux kernel development. It tracks changes to files over time, lets multiple people collaborate, and gives every developer a complete copy of the project history. Today Git powers most of the world's open source and enterprise software development.
What Git is
Git is a content-addressed snapshot system. Each commit stores a complete picture of your project's tracked files, identified by a cryptographic hash. Git is fast because most operations are local, and resilient because every clone is a full backup.
- Distributed: every clone is a complete repository.
- Snapshot-based: commits store trees, not diffs.
- Branch-friendly: branches are cheap pointers, not full copies.
What Git is not
Git is not a backup tool, not a code review system, and not a deployment platform. It does not lock files like centralized systems (CVS, SVN, Perforce in default mode). It does not store binary diffs efficiently for large media files without extensions like Git LFS. And Git is not GitHub: GitHub, GitLab, and Bitbucket are hosting services built on top of Git.
Trying it out
Verify Git is installed and inspect its version:
git --version
Initialize a tiny repository to see Git in action:
mkdir hello-git
cd hello-git
git init
echo "hello" > readme.txt
git add readme.txt
git commit -m "first commit"
git log --oneline
Why Git won
Before Git, most teams used centralized tools that required network access for nearly every action. Git's distributed model meant developers could commit, branch, and review history offline. Combined with cheap branching and Linux kernel adoption, Git became the de facto standard within a decade. The widespread availability of free hosting on platforms like GitHub, GitLab, and Bitbucket cemented Git's place: a generation of developers learned Git as their first version control system.
How Git stores data
Git's storage model is unusual. Instead of recording diffs between versions, Git stores complete snapshots of every file in every commit, deduplicated by content hash. This makes operations like checkout and branch switching essentially constant-time, and makes history operations like log and blame surprisingly fast. The trade-off is that random binary changes can blow up storage, which is why Git LFS exists for large assets.
Common mistakes
Beginners often confuse Git with GitHub, or assume Git tracks every file in a folder automatically. Git only tracks files you explicitly git add, and only versions content under the working directory of an initialized repository. Another myth: Git "saves" continuously. It does not. Nothing is recorded until you run git commit. Finally, Git is not designed for large binary assets; use Git LFS or a different system for video, large datasets, or built artifacts.