Background gradient

Like yesterday’s announcement of collaborative stacks, today’s launch has been one of our most highly-requested features. Starting soon, Graphite will automatically rebase your stacked PRs after you begin merging them — so you don’t have to.

Until now, partially merging part of a stack of pull requests on Graphite was a disjointed experience. Let’s say you wanted to merge the first 2 PRs in a stack of 4: you’d go to the 2nd PR on the Graphite dashboard, click “Merge 2 PRs,” and let Graphite handle the merging.

However, you’d then end up in a state where the 2 remaining PRs in your stack would need to be rebased onto main to show the correct code diffs on GitHub and to unblock further merging. Previously, the easiest fix for this was to hop back over to your terminal and run gt sync && gt submit.

This not only added an extra step to remember but also led to inaccurate code diffs being displayed on GitHub until you ran the commands, as well as potential issues with codeowners and GitHub Actions workflows.

So many of you have asked for a more seamless experience around partially merging stacks, and that’s what we’re shipping today. Graphite now automatically rebases partially merged stacks for you - so you never have to remember to run gt sync && gt submit to rebase the upstack PRs. Your teammates will always see the correct diffs on Graphite or GitHub, and you won’t have to worry about the wrong reviewers being assigned to your PR.

Automatic rebasing also works seamlessly with your local branches - just run gt sync as you’d normally do before re-starting development and Graphite will pull in the rebased branches from remote and apply the changes locally.

Our goal in shipping this was to fit it seamlessly into the workflow you already know. There’s no new commands to learn or tools to install - it just works.

When you partially merge a stack of pull requests, Graphite now runs a job that automatically rebases the remote branches corresponding to the PRs “upstack” of the one(s) you merged. This means there is never a moment where the new base of the stack points to a branch or pull request that no longer exists, so there’s no possibility of seeing an incorrect code diff.

The local development updates that make this possible build on yesterday’s announcement of shared stacks - the Graphite CLI detects when Graphite has made updates to the remote version of a local branch, and gt sync pulls in and applies those updates locally, almost like you’re collaborating on your stack with a Graphite bot.

We’re gradually rolling out this change to all users over the coming month - if you want to be one of the first to try it out, sign up for the beta!


Give your PR workflow
an upgrade today

Stack easier | Ship smaller | Review quicker

Or install our CLI.
Product Screenshot 1
Product Screenshot 2