Paths/Claude Engineer/Git with Claude Code / Checkpoints & Isolation
Use Checkpoints as a Way Back
When a session goes wrong you need somewhere to go back to. Write the checkpoint discipline the team uses.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- File ~/.claude/git/checkpoints.md exists○
- The document states when a checkpoint is taken○
- The document states how to return to one○
02Walkthrough
4 steps- 01
Create the git directory
The git rules live with the rest of the configuration.
mkdir -p ~/.claude/git - 02
Write when a checkpoint happens
A checkpoint before every risky step - a bulk edit, a dependency change, a refactor across files.
echo '# Checkpoints\n\n## When a checkpoint is taken\n\nBefore every risky step - a bulk edit, a dependency change, a refactor across files. A checkpoint is a commit on a scratch branch, or a stash when the work is not ready.' > ~/.claude/git/checkpoints.md - 03
Write how to return to one
A checkpoint you cannot get back to is not a checkpoint. Name the command and the branch.
echo '\n## How to return\n\n- list the checkpoints with git log on the scratch branch\n- go back with git checkout on the branch, or restore the stash with git stash pop\n- the checkpoint branch is never merged and never pushed\n\n## Commits\n\nA checkpoint commit is a message and nothing else. The real history is written by hand, at the end, when the change is understood.' >> ~/.claude/git/checkpoints.md - 04
Verify and submit
cat the rules, then submit for validation.
cat ~/.claude/git/checkpoints.md
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — ubuntu:24.04
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list