🌪️ Why git exists (the problem it solves)

By the end of this page you will know exactly what problem git solves, and why GitHub is a different thing.

1The folder everyone has

You have seen this folder. Maybe you own this folder right now. It looks something like this:

# Documents/School/BigReport/
report.docx
report_v2.docx
report_v2_FINAL.docx
report_v2_FINAL_for-real-this-time.docx

Here is the thing: this is not silly. This is a smart instinct. You wanted to keep old versions safe while you kept working. You invented version control by hand.

But the hand-made version falls apart fast. Which file changed what, exactly? When did you change it? Why? And the nightmare question: what happens when a teammate edits report_v2.docx while you edit report_v2_FINAL.docx? Now there are two "latest" versions, and nobody knows which one is real.

2What we actually want

Imagine you could write a wish list for a tool that fixes the chaos. It would probably say:

WishWhy it matters
Keep every version, foreverYou can always go back, nothing is ever lost
A short note on each changeFuture you knows why something changed
Who changed it, and whenNo more guessing or blaming
Several people working at onceTeamwork without stepping on each other
No filename chaosOne file called report.docx, always

Good news: this exact wish list already exists, and it is free. It is called git. It was built in 2005 by Linus Torvalds, the creator of Linux, when his team suddenly lost access to the tool they had been using to track changes and nothing else out there was good enough. Today basically every software team on earth runs on it. And it works just as well for one person with one project.

3Save points for your files

Before we learn any commands, lock in the core idea. Git lets you freeze your whole project at a moment in time, give that moment a name, and come back to it whenever you want.

🎮 Git works like save points in a video game. Before the boss fight, you save. If the fight goes badly, you do not start the whole game over. You just load the save and try again. Git gives your files the same superpower: save before a risky change, and if it goes wrong, calmly step back to the last good moment.

This is also why git feels so safe once you trust it. Once you have made a save point, that version of your project is almost impossible to lose. Even if you delete files, even if an experiment goes sideways, the save point is still there waiting for you.

4See the difference

Here is the same project, twice. On the left, the hand-made way. On the right, the git way: one clean line of save points, oldest on the left, newest on the right.

Without git report.docx report_v2.docx report_old_KEEP.docx report_v2_FINAL.docx report_v2_FINAL_for-real.docx copy of report (1).docx With git 3e91f04 first draft a47c2d1 added intro 9b05e8f fixed typos c1d77a2 final polish

Each circle is one save point: the whole project, frozen, with a note in plain words. The little arrows point each save point back at the one that came before it, like beads on a string. One file name. Full history. Zero chaos.

5Git vs GitHub, the 10-second version

People mix these two up all the time, so let's settle it before we go any further. One is a tool on your machine. The other is a place on the internet.

🗣 Git is a free program that runs on YOUR computer. It manages the save points for your projects, and it works perfectly with no internet at all. GitHub is a website where copies of git projects live, so people can share them and work together. Think car vs parking garage, or camera vs photo-sharing site. You can own a camera and never upload a single photo.

This course teaches you both, git first. Once save points feel natural on your own machine, putting a copy on GitHub takes about five minutes.

⌨️ Try it yourself

Open the Terminal app on your Mac (press Cmd+Space, type "Terminal", press Return). Then type this and press Return:

git --version
git version 2.49.0

If you see a version number, git is already on your computer, no installation needed. If your Mac offers to install developer tools instead, click Install and let it finish. Either way, you are ready for Lesson 2.

6Check yourself

Q. Which sentence is true?

Git is the program on your machine that manages save points. GitHub is one popular website where copies of git projects live. You can use git for years without ever touching GitHub.

One more to think about: why not just keep copies of the whole folder, like the v2_FINAL method, but tidier?

Three reasons. Copies do not tell you what changed or why, so you end up opening files side by side and squinting. Copies drift apart, and soon nobody knows which one is current. And merging two edited copies by hand is pure misery. Git automates all three: every save point has a note, there is one official history, and git can combine two people's changes for you.
🧠 If you remember one thing: Git is a better version of the v2_FINAL folder instinct: every version kept, every change explained, no chaos.