What you can do after this lesson
You will be able to explain what version control is, say how Git relates to GitHub, and decide whether a project of yours should be tracked. This lesson has no setup. The next one installs Git. Here we build the mental model that makes the commands in later lessons feel obvious rather than magical.
The problem version control solves
Almost everyone starts the same way. You have a file, and you change it. You are afraid of losing the old version, so you save a copy:
report.doc
report-final.doc
report-final-v2.doc
report-final-v2-REAL.doc
report-final-v2-REAL-fixed-monday.docThis works for a while and then falls apart. You cannot tell which file is the newest. You cannot see what actually changed between two copies without opening both. If two people edit different copies, merging their work is manual and error-prone. And the folder fills with clutter.
A version control system (VCS) replaces that habit. You keep one folder of real files. Whenever you reach a meaningful point, you tell the system to record it. The system stores the change, who made it, when, and a short note from you explaining why. Later you can ask what a file looked like last Tuesday, which change introduced a bug, or how two versions differ. You can go back to an earlier state without keeping copies in your working folder.
Git in one paragraph
Git is a version control system created in 2005 for developing the Linux kernel, and today it is the most widely used one for software. It is free and open source. It runs on Windows, macOS and Linux. You mostly use it from a terminal, although many editors and desktop apps put a friendly face on the same commands. The official documentation lives at git-scm.com, and the free Pro Git book there is an excellent reference. This course teaches Git 2.55, which is what we verified every example against as of 2026-11. Everything in the early lessons works in much older versions too, and where a command is newer we will say so.
Distributed means everyone has the history
Older systems kept the history on one central server, and your computer held only the current files. Git is distributed: when you copy a project, you copy its entire history. Your machine holds every version of every file. That has practical effects:
- Almost every command, such as looking at history or making a commit, works with no internet connection.
- Commands are fast, because they read from your own disk.
- Every copy is a complete backup of the project's history. Several people each holding a copy is a reasonable safety net, though not a replacement for a real backup strategy.
Teams usually still agree on one shared copy to treat as the official one. That shared copy lives on a server or a hosting service. We cover it in the lessons on remotes.
Git and GitHub are not the same thing
This is the most common beginner confusion, so be precise:
- Git is the tool. It lives on your computer and manages the history.
- GitHub is a website and company that hosts Git repositories online and adds features around them: issues, pull requests, code review, project pages and automation. GitLab, Bitbucket and others offer similar services.
You can use Git for years without GitHub. You cannot use GitHub without Git, because every repository on it is a Git repository. Lessons 14 to 18 of this course cover GitHub. Everything before that is pure Git.
A tiny vocabulary
A few words appear in every lesson, so meet them now:
- Repository (or repo): a project folder plus the hidden history Git keeps for it.
- Commit: one recorded snapshot of the project, with a message, an author and a date. A history is a chain of commits.
- Branch: a movable label pointing at a commit, letting you work on an idea separately.
- Remote: another copy of the repository, usually on a server, that you can send changes to and fetch changes from.
- Clone: to copy a repository, history included.
Do not worry about memorising these. Each gets its own lesson.
What a history looks like
Here is a small history as Git prints it. This is example output from a practice repository; real hashes (the seven characters at the start of each line) differ on every machine.
6187226 Add cinnamon bun to the menu
5bf5647 Add the bakery menuEach line is a commit. The code is a shortened identifier, and the rest is the message the author wrote. Reading messages like these tells a story: the menu was created, then a bun was added. The point of version control is that this story exists and is searchable.
Why bother, even alone
Solo developers get real benefits:
- Undo. If an experiment goes wrong, you return to the last good state.
- Understanding. Months later you can see why a line changed, not just that it did.
- Safe experiments. Branches let you try a risky idea without disturbing working code.
- Evidence. A history shows how a project grew, which helps when you hand it to someone else or return to it after a break.
- A path to collaboration. The same habits scale to a team without relearning anything.
Version control works best on text: source code, Markdown, configuration, plain-text documents. It handles large binary files such as videos or design files poorly, because it cannot show line-by-line differences for them.
Common mistakes
- Thinking Git is GitHub. Learning Git commands is independent of any website.
- Treating Git as a backup. A repository on one disk with no remote copy is not backed up. A copy elsewhere is needed.
- Committing rarely. Waiting a week and then recording everything in one commit throws away the benefit. Small, frequent commits are easier to understand and undo.
- Storing secrets. Passwords and keys in a repository remain in history even after you delete them. A later lesson on
.gitignorecovers prevention. - Expecting Git to merge anything. It merges text well, but it cannot meaningfully combine two edits of a binary file.
Exercise
- Think of a project of yours, perhaps a website, a notes folder or a script. Write down three questions about its past that you currently cannot answer, such as "when did I change the price list?"
- List two files in it that would suit version control and one that would not.
- In your own words, write two sentences explaining the difference between Git and GitHub as if to a friend.
Show one possible answer
- Examples: "Which change broke the contact form?", "What did the homepage say in March?", "Who changed the discount rate?"
- Suited: an
index.htmlfile and anotes.mdfile. Not suited: a large screen recording, because Git cannot show readable differences for it and each version adds its full size to the history. - "Git is a program on my computer that remembers every version of my files. GitHub is a website where I can put a copy of that history so other people can see it and help."
Key points
- Version control records every saved state of a project so you can compare, undo and share changes.
- Git is the tool that runs on your computer; GitHub is a website that hosts Git repositories and adds collaboration features.
- Git is distributed: every clone holds the full history, so most work needs no network.
- A commit is a named snapshot with an author, a date and a message explaining why it exists.
- Version control helps solo developers too, because it answers what changed, when, and why.