using-git-worktrees
OBobra/superpowers298k2,205 new stars in the last 7 days
Prepare PRs for review by cleaning noisy history, improving PR descriptions, and adding reviewer guidance without changing code behavior. Use for "make this easy to review", "tidy this PR", "clean up commits", or "annotate the diff".
Prepare a PR so a reviewer can quickly understand the intent, important files, and risk. The default goal is reviewability without behavior changes.
Only rewrite history when the user asks for it or agrees to the plan. Before rewriting:
gh pr view <PR> --json title,headRefName,baseRefName,state,commits
git fetch origin <headRefName> <baseRefName>
ORIGINAL_TREE=$(git rev-parse origin/<headRefName>^{tree})
Good commit groupings usually follow dependency order:
After rewriting, verify content identity:
echo "Original tree: $ORIGINAL_TREE"
echo "Current tree: $(git rev-parse HEAD^{tree})"
git diff origin/<headRefName> --stat
Do not push if the tree changed unintentionally.
When code behavior should stay untouched, prefer PR description and review notes:
OBobra/superpowers298k2,205 new stars in the last 7 days
OBobra/superpowers298k2,205 new stars in the last 7 days
OBobra/superpowers298k2,205 new stars in the last 7 days
MAmattpocock/skills288k8,502 new stars in the last 7 days
MAmattpocock/skills288k8,502 new stars in the last 7 days
MAmattpocock/skills288k8,502 new stars in the last 7 days