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
Apply working-tree changes to the current branch and automatically restack every upstack descendant. User input: $ARGUMENTS.
gt modify -a # stage all + amend
gt modify # amend already-staged changesgt modify -cam "fix tests" # stage all + new commit with message
gt modify -cm "fix tests" # already-staged changes + new commit with message-m "<message>" — gt modify -c alone opens $EDITOR for the message, which hangs in a non-interactive shell.gt modify --into <ancestor-branch>git status --short and gt ls so the user sees what is staged and where it will land.$ARGUMENTS. If ambiguous (multi-commit branch already exists), ask the user: amend or new commit? Amend keeps the branch single-commit (preferred Graphite style); new commit makes it a multi-commit branch that may need gt squash later.gt modify command.gt add . to mark resolved.gt continue -a to finish the restack chain.gt abort to back out cleanly.gt ls to confirm the new state.-a, --all — stage all modified files before amending-c, --commit — create a new commit instead of amending-m, --message <msg> — commit message (for -c or to reword on amend)-p, --patch — interactive hunk staging--into <branch> — amend into a downstack branch in one stepgt absorb insteadIf the working-tree changes belong to multiple downstack branches (e.g. you fixed several bugs across the stack), use gt absorb -a — Graphite picks the right branch per hunk.