Step 01 / 10
The 3 zones of Git
Before learning the commands, you need to understand the 3 zones through which your files move. Each Git command moves files from one zone to another.
Zone 1: Working Directory (your desk)
This is the folder on your computer. You create, modify, and delete files as usual. Git watches this folder, but doesn't save anything until you ask it to.
The analogy
It's your physical desk: you work there, put down papers, scribble notes. Nothing is archived until you put it away.
Zone 2: Staging Area (the envelope)
This is an intermediate zone where you prepare what will go into the next commit. You choose precisely which files (or which changes) you want to save.
The analogy
It's an open envelope on your desk. You place the documents you want to send inside. As long as you haven't sealed it (commit), you can still add or remove documents.
Zone 3: Repository (the filing cabinet)
This is the complete history of your project, stored in the hidden .git folder. Each commit is a permanent, immutable snapshot.
The analogy
It's the filing cabinet: once a document is filed, it stays there forever. You can look it up at any time, but you don't modify it.
Working Directory -> git add -> Staging Area -> git commit -> Repository