Version control
A system that tracks changes to files over time, letting you view history, revert, branch, and collaborate. Git is the dominant version control system. Without it, collaborating on code is chaos — you'd email files and lose history.
- Every software project.
- Any collaborative work needing history.
- One-off scripts with no history needs.
Definition
Version control (VCS) records every change to a set of files as a versioned commit. You can view any past state, branch to work in parallel, merge work together, and see who changed what. Distributed VCS (Git) gives every developer a full copy.
Why it exists
To manage change over time: track history, experiment safely in branches, collaborate without overwriting, and roll back mistakes. Essential for any team project.
How it works
You commit changes with a message. The VCS stores the diff/snapshot. You branch to diverge, merge to combine. Remotes (GitHub) sync between developers. History is a graph of commits.
Scaling limits
Learning curve for advanced operations. Large repos can be slow. Binary files don't diff well.
Cost shape
Free (Git). Hosting (GitHub/GitLab) has free tiers.
Alternatives
- None — Simple but you lose history and collaboration.
- Cloud sync (Dropbox) — Syncs files but no branching/history.
Failure modes
- Merge conflicts.
- Lost commits from not pushing.
- Accidentally committing secrets.