ch08 · operator · 85-115 min
Git for Linux operators
Use Git as a working-tree safety system: inspect, stage, branch, sync, recover.
You can preserve work and recover local history without making a repository worse.
shows: The states work passes through (working tree, index, commit/branch, remote), the commands that move it between them, and reflog as the local-only save-point net that reset --hard can otherwise destroy.
does not prove: It does not prove your repository is recoverable: reflog only protects commits Git has actually recorded, so unstaged or untracked working-tree changes wiped by reset --hard are not in scope and stay gone.
Lessons in this chapter
Git rescue rehearsal
Recover a disposable repo from a bad local commit while preserving a backup branch and explaining the reflog path.
DeliverableA recovery transcript and final graph.
Success criteria
- You preserve work before destructive repair.
- You can name working tree vs index vs commit.
- You inspect history shape before sync.
Git Basics
After you can explain the working tree, index, commit, branch, and remote state.