What Is Version Control?
Scenario: You edit a file for three hours, save it, and realize you broke everything and want yesterday's version back. Without version control, it's gone. With Git, you just… go back. That safety net is why every software team on earth uses it.
If you've ever worked on a document, you've probably lived through the informal, painful version of version control already: essay.docx, essay_final.docx, essay_final_v2.docx, essay_final_ACTUALLY_FINAL.docx. That's you, by hand, trying to keep old copies just in case. It doesn't scale, it's easy to lose track of which file is current, and it's impossible to share safely with anyone else editing the same document.
Version control is software that does this properly: it records every meaningful change to a set of files over time, gives each change a permanent label, and lets you view, compare, or restore any past state on demand - without renaming a single file. Git is by far the most widely used version control tool, and it's specifically a distributed one, meaning every person who copies ("clones") the project gets the entire history, not just the latest files. There's no single central server holding the "real" copy that everyone depends on.
Analogy: Think of Git as an infinite save-game system for your code. Every commit is a save point you can reload. Branches are parallel timelines you can explore and merge back. Nothing you've saved is ever silently lost.
A handful of words will come up constantly from here on. You don't need to memorize the mechanics yet - just recognize the words when you see them; each one gets its own deep dive in a later section.
| Term | Plain-language meaning |
|---|---|
| Repository (repo) | A project that Git is tracking (a hidden .git folder inside it holds the entire history) |
| Commit | A saved snapshot of your project at one point in time, with a message explaining what changed and why |
| Branch | An independent line of development - a way to work on something without disturbing the main line of work |
| Remote | A copy of the repo hosted somewhere else (most often GitHub, GitLab, or Bitbucket) so people can share it |
Note: Git ≠ GitHub. Git is the tool that runs on your own computer and does the actual version-tracking. GitHub (and GitLab, Bitbucket) are websites that host Git repositories in the cloud so teams can share them, review changes, and run automated checks. You could use Git for years without ever touching GitHub - though in practice almost every professional team uses both together.
Warning: A common beginner assumption: "Git backs up my files automatically, so I'm safe." Not quite - Git only knows about changes you've explicitly committed. If you edit a file and never commit it, Git has no record of that version at all. The habit you're building in this track is: commit early, commit often.