Chapter One · Foundations

Why Version Control Exists

Before a single command, the honest picture: what goes wrong without version control, what Git actually is, the project you will build across this whole book, and the terminal you have never opened. Nothing is installed until the last topic, because a tool is easier to learn once you know what it is for.

5 topics

Most people meet Git the same way: someone says "just push your changes" on the first day of a new job or a new course, and a tool that has never been explained is suddenly in the way of the work. This chapter is the explanation that should have come first.

Nothing gets installed until the last topic, and that order is deliberate. First the problem — what actually goes wrong when you keep versions of your work in folders with hopeful names. Then what Git is, in plain terms, and the three things people expect it to be that it is not. Then Sandpiper, the small website you will build across the whole book, so that every command from here on has something real to act on. Then the terminal: a window where you type the name of a program, which is less dramatic than films suggest and is where the rest of this book happens. Only after all of that does Git arrive on your machine.

What this chapter puts in place, from the ground up
Git, installed and told who you are
one program · two settings · thirty seconds nearly everyone skips
A terminal you can move around in
where am I · how do I get there · how do I read an error
One real project to practise on
Sandpiper · a home page · a stylesheet · a classmate called Theo
A reason: four questions you cannot answer today
what changed · when · why · who

Topics in This Chapter