Meet Git and the Repository
In the last lesson we saw why version control exists: to give your work a memory, so you never lose a good draft or fear a bad change. Now let's meet the tool that provides that memory.
Here is the plain idea: Git is a program that does version control for you, and a repository — usually shortened to repo — is a folder that Git is watching and remembering. Turning an ordinary folder into a repository is simply telling Git: please keep track of everything that happens in here from now on.
The bound notebook
Think back to writing a book. A loose pile of pages can be shuffled, lost, or muddled. So a careful author works in a bound notebook — pages sewn into the spine so none can fall out, kept in order, with the whole manuscript living in one place.
A repository is that bound notebook. And it has two parts worth naming.
The pages you're actively writing on — the current files exactly as you see them in your file browser — are the working directory. This is the part you touch. You open, edit, and save files here just as you always have. Git watches, but it doesn't get in your way.
The notebook's spine is a small hidden folder Git tucks inside, named .git. That spine holds the entire recorded history — every saved version, in order. You almost never open it or touch it by hand. You just need to know it's there: the hidden .git folder is the one thing that makes a plain folder into a repository. Tear out the spine (delete .git) and you keep today's pages but lose the history. So leave it be.
Git is local first
Here's something that surprises newcomers. Git lives on your own computer. You don't need the internet, an account, or anyone's permission to start tracking your work.
The everyday picture: your notebook sits in your bag. You don't phone a library to write in it — you just open it and write. Every saved version is right there in the spine, on your machine. You can work on a plane, in a basement, anywhere, with zero connection.
Many people also keep a copy online — on a website like GitHub — to back it up or share it. That's genuinely useful, and we'll meet it near the end of the course. But it's an extra, not a requirement. The heart of Git beats locally, on your desk.
A gentle note on how this course works
One reassurance before we go on. This course teaches the ideas of version control — what a repository is, what a save-point means, how to read your history. It is not a list of commands to memorize.
Think of it like learning what a thermostat does — warm the room when it's cold — rather than which exact buttons your particular model has. Git is usually driven by typing short commands, but there are also friendly button-and-menu apps that do the same thing. Whichever you use, the concepts are identical. A save-point is a save-point whether you typed it or clicked it.
Your turn
No setup needed — just picture your most-edited project folder becoming a repository, and name its two parts.
- Which part is the working directory — the live pages you write on?
- Which hidden part is the spine, quietly storing every past version?
If you said the working directory is your normal, visible files, and the hidden .git folder is the spine, you've got it. Same folder, new memory.
Next we'll take our very first snapshot — the heart of the whole system, called a commit, the save-point. 🔦
Stuck or curious?
Ask Pip about this lesson — tap the porthole bottom-right.