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
Collapse a multi-commit branch into a single commit. User input: $ARGUMENTS.
gt modify -c commits during review and should land as one logical change.gt fold, to keep the combined branch single-commit.git log --oneline <parent>..HEAD to show the commits about to be squashed.gt squash — Graphite opens $EDITOR with all the commit messages concatenated so you can craft a final message.
gt squash -m "<message>" skips the editor with a preset message.gt squash -n / --no-edit reuses the first commit's message untouched.gt squash rewrites the branch's SHA. Upstack children now point at the old SHA — run gt restack to bring them onto the new commit. If gt restack hits conflicts, resolve in editor → gt add . → gt continue -a.gt submit -u (or gt submit --stack -u) to force-push the updated branch to the PR.--force-with-lease so concurrent updates from teammates are rejected, not overwritten.