Stacked PR workflow with the Graphite CLI (gt) — create stacks, submit, sync, restack, split/squash/fold, track existing branches, collaborate on shared stacks, configure repo/CI for Graphite, and operate the merge queue.
70
88%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Divide the current branch into a stack of smaller branches. User input: $ARGUMENTS.
gt split --by-commit (-c) — split along existing commit boundaries. Each commit becomes its own branch. Only useful on a multi-commit branch.gt split --by-file "<pathspec>" (-f) — peel off files matching the pathspec onto a new branch. Repeat -f for multiple patterns: gt split -f "*.json" -f "*.yaml".gt split --by-hunk (-h) — interactive git add --patch-style hunk selection.gt ls and git log --oneline <trunk>.. so the user sees what's on the branch today.--by-commit.--by-file.--by-hunk.gt split <mode>.gt ls and consider gt submit --stack to open PRs for the new branches./graphite:fold (into parent) or /graphite:squash (commits within one branch).