git-workflow
Installation
SKILL.md
Git Workflow
A git workflow for any change that will be reviewed. Sloppy git history is unreviewable and unrevertable; these habits keep it legible so review is fast and reverts are surgical.
Tradeoff: this biases toward small commits and small PRs. For a one-line typo fix, use judgment.
1. Start fresh
Branch from an up-to-date main. A branch cut from stale main carries conflicts you did not write.
git checkout main
git pull origin main
git status # confirm a clean tree before branching