1. Why Version Control Exists
Why Version Control Exists
Before version control, developers saved code as project_final.zip, project_final_v2.zip, project_ACTUALLY_final.zip, and emailed each other files. When two developers edited the same function simultaneously, one overwrote the other's work — and the lost changes were gone forever. Version control was invented to solve this problem at scale.
🔥 The Problems Version Control Solves
- Lost work: Every version of every file is permanently saved. You can return to any point in history.
- Overwrites: Multiple developers can edit the same file simultaneously. Git tracks and merges their changes.
- Accountability: Every change is recorded with who made it, when, and why (via commit messages).
- Experimentation: You can try a risky change on a branch without touching the production code. If it fails, delete the branch. If it works, merge it.
- Deployment tracking: You can see exactly what code is running in production right now, and exactly what changed between any two releases.
📖 A Brief History
Centralised: one server holds all history. If the server goes down, everyone stops working.
Improved centralised VCS. Still widely used in enterprise. Every operation requires a network connection.
Linus Torvalds created Git in 10 days after a licensing dispute with BitKeeper. Distributed: every developer has the full history. Now used by 96%+ of professional developers.
Git hosting + social features. Became the standard for open-source collaboration. Acquired by Microsoft in 2018 for $7.5 billion.
🌐 Git vs. GitHub — Not the Same Thing
This is the most common confusion for beginners:
- Git is the version control software. It runs on your local machine. It manages your repository. It has nothing to do with the internet.
- GitHub is a website that hosts Git repositories in the cloud. It adds collaboration features: pull requests, issues, code review, CI/CD. It is one of many Git hosting services.
- Alternatives to GitHub: GitLab (often self-hosted by enterprises), Bitbucket (popular in Atlassian shops), Azure DevOps (Microsoft enterprise).
Knowledge Check
Ready to test your understanding of 1. Why Version Control Exists?