The Three Real Areas
1. Working directory an ordinary file, exactly like any other file on disk
2. Staging area marked "include this in the next commit" — not committed yet
3. History a real, permanent commit — genuinely safe
Working Directory: Just a File
echo "Chocolate Chip Cookie Recipe" > cookies.md
git status
Untracked files:
(use "git add <file>..." to include in what will be committed)
cookies.md
git genuinely sees the file exists, but is not tracking its content in any way yet. It is an ordinary file on an
ordinary filesystem — nothing about it is backed up by git.
Staging: Marked, Not Saved
git add cookies.md
git status
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: cookies.md
git diff --staged shows exactly what is queued for the next commit:
diff --git a/cookies.md b/cookies.md
new file mode 100644
+Chocolate Chip Cookie Recipe
The Honest Answer
Right now — staged, but not committed — there is still no commit in this repository's history that includes
cookies.md. git log would genuinely show nothing at all. Staging is a real, useful checkpoint for building up
exactly what a commit should contain, but it is not the safety net — only a real commit is.
Your repository exists, but it is still genuinely empty — no history at all. In this lab you add a real recipe file and watch it move through git's three real areas: the working directory (an ordinary file on disk), the staging area (marked for the next commit, but not committed), and — not yet reached in this lab — history.
Along the way, ask the honest question the curriculum poses directly: if this VM crashed right now, is this file actually safe? The answer, checked directly rather than assumed, is genuinely no — until it is committed.
Working directory
The ordinary files on disk that make up your project right now. Git can see them, but a file sitting only in the working directory has no git history protecting it at all.
Staging area (the index)
A real, separate checkpoint where changes are marked "include this in the next commit" via git add, before the commit itself is actually made. Confirmed directly in this lab: git status genuinely distinguishes staged changes from untracked and unstaged ones.
git diff --staged
Shows the exact content difference between the last commit and what is currently staged — the precise, real content that the next git commit would record.
Takeaways
- An untracked file in the working directory is genuinely just an ordinary file — git sees it exists but tracks none of its content
- git add moves a file into the staging area, marking it for the next commit — confirmed as a real, distinct git status state
- git diff --staged shows the exact real content that the next commit would record
- Staged is genuinely not the same as safe — only a real commit creates permanent history
- git status is the honest, real mirror to check at every step — untracked, staged, or clean