Git Workflow
Claude Code works best when the git workflow is explicit.
Basic rules
- inspect the current worktree before changing anything
- do not revert unrelated user changes
- keep the diff scoped to the task
- verify before you commit
A practical workflow
- check
git status - inspect the affected files
- make the smallest complete change
- run the narrowest useful verification
- summarise the result clearly
Why this matters
AI coding tools can move quickly across files. Without git discipline, that speed turns into noisy diffs, accidental regressions, and harder reviews.
The goal is not "the agent changed a lot of files." The goal is "the diff is intentional, readable, and easy to review."