Playbook overview

git_learnings.md

Guide, operating model and reference

Illustrative entry. Read this file when staging, committing or recovering work.

Review what’s staged separately

When it matters. A shared working tree may already contain changes. A previous command may also have staged something. Checking the unstaged diff alone can leave both surprises until review.

What to do. Check status before editing. Before committing, inspect the unstaged and staged changes separately. Stage the paths you own, or select specific hunks with git add -p when a file contains separate work. If a hunk mixes your edits with someone else’s and you can’t split it confidently, stop and ask.

git status --short
git diff
git diff --cached

Evidence. On a disposable branch, make one change and stage it, then make another without staging it. The two diffs show different changes. Review status as well so untracked files are visible. Git diff manual · Git add manual

Keep current. If the team provides isolated worktrees by default, revise the “when it matters” note. The staged review still applies when a commit is about to be made.