Skip to content
Versora
All features

Stacked branches (stacked MRs)

One big change, several small MRs and no rebasing by hand.

The problem

Nobody reviews a huge MR properly, but splitting it into dependent MRs turns into one rebase after another.

10 features

Splitting a big change into small parts makes each review shorter and more careful. That's when the work starts: every tweak to the bottom branch calls for rebasing all the ones above it, each MR has to target the one before it and, when the first one lands, everything has to be retargeted. Versora takes care of that part.

You create the stack and work on each branch as usual. The app redoes the rebases, pushes the branches, chains the MRs and merges them in the right order, and the stack is stored only in the repository's local config.

Step by step

How it works in Versora

1Step 1 of 6Free here, paid elsewhere

Create and stack

“New stacked branch” starts the next part on top of a branch, and “Stack on…” slots in a branch that already exists. The STACKS section, in the left panel, shows the order and, for each branch, the MR, the approval and the pipeline.

In the graph, the label shows the branch's position in the stack, like “2/3”.

The Stacks section with three stacked branches, each with its own merge request, approval and pipeline, and the 1/3, 2/3 and 3/3 labels in the graph
2Step 2 of 6

Restack

Changed something in the bottom branch? “Restack” rebases every branch above it, in cascade, in a single rebase.

If the result isn't what you wanted, Ctrl+Z reverts them all at once.

The command this replaces
In the terminal1×
git rebase -i --update-refs main
In Versora · one action

“Restack”: every branch at once.

The Stacks section with three stacked branches, each with its own merge request, approval and pipeline, and the 1/3, 2/3 and 3/3 labels in the graph
3Step 3 of 6

Push the stack

“Push the stack” does an atomic push of every branch, with --force-with-lease and --force-if-includes: either they all go, or none do.

If the server has commits you haven't fetched yet, nothing is pushed, and the notice offers “Update the stack from the server”.

The command this replaces
In the terminal1×
git push --force-with-lease --force-if-includes --atomic origin feature/historico-api feature/historico-ui feature/historico-filtros
In Versora · one action

“Push the stack”: all of them, or none.

Command palette open with the stack commands
4Step 4 of 6

MRs chained from the start

When you create the MR for a branch in the stack, the target is already the branch below it, not main. The description gets the “Stack: !10 → !11 → !12” navigation, so reviewers know which part they're looking at.

5Step 5 of 6

Stack merge

“Merge the stack up to here” first shows a plan with the approvals, the pipeline, the conflicts and the merge train for each MR. Then it merges bottom up, MR by MR, via direct merge, auto-merge, merge train or merge queue, and between one and the next it retargets, restacks and pushes.

If something stops the process, the banner explains why and offers what to do. The app can even be closed midway: when you reopen it, it picks up where it left off.

6Step 6 of 6

Sync after the merge

When the bottom branch lands in main, even via squash, “Sync” retargets the MRs above it and rebuilds the stack without it.

You don't need to figure out which commits already landed or change each MR's target by hand.

The command this replaces
In the terminal2×
git fetch origingit rebase --onto origin/main feature/historico-api feature/historico-ui
In Versora · one action

“Sync”: retargets the MRs and rebuilds the stack.

And there's more

4 more Stacks features

Grouped by who gets the most out of them. Open a feature to see the details.

You'll like these if you…

review merge requests

  • Stacks · ba41159

    Get a teammate's stack

    Brings in every branch in the stack, showing first what will be created or updated. Local commits the server doesn't have are never overwritten.

rewrite history

  • Stacks · 0face09

    Edit the structure

    Pull the whole stack, move a branch up or down, fold it into its parent, split a branch and see the diff of the branch and of the whole stack.

    Command palette open with the stack commands

set the team's standards

  • Stacks · 0374078

    Server-native stacks

    Works alongside GitLab 19.1+ and GitHub stacks: it notices when the server recognizes the stack, avoids duplicate navigation and doesn't compete over retargeting.

come from the terminal

  • Stacks · 144a3a5

    Stacks from other tools

    Recognizes stacks created with the GitLab CLI or other command-line tools, and MR chains that already exist.