Chapter 3
Three areas and your first commit
Updated July 31, 2026
The repository exists, but nothing is saved inside it yet. What comes next is the loop you will repeat every working day: edit files, pick out what belongs together, save a snapshot. Underneath that loop sits a model of three areas, and almost every git command moves something between them. Read this chapter slowly. The rest of the book stands on it.
The desk, your hands, the archive
Picture a desk covered in paper. Some sheets are half written, some crossed out, some just lying around. That is the working directory, your project folder exactly as the file manager shows it. Git looks at it but saves nothing from it until you ask.
You go through the desk and put the sheets you are ready to file into a stack in your hands. The stack is the inde
Read the rest with a free account
This chapter is free once you sign in. Create an account to keep reading.
Already have an account? Sign in