Rebase pull request stacks with option for automatic rebasing

Author: trevor-polidoreCreated Sep 10, 2026Updated Sep 22, 2026
Labelstriage

Description

Summary

Today, keeping a stacked pull request current means rebasing through GitHub UI (which doesn't provide options to resolve issues well), managing each layer by hand locally, or via the GitHub CLI. GitLens provides a superior rebase experience and already resolves conflicts automatically for a single rebase (Auto-Rebase). Now that GitLens also surfaces stack association and offers a 'Merge Stack…' option, GitLens should add the ability to complete the whole cascade and address conflicts, providing an optimized experience for users using stacked PRs in their project.

Goals

  • One action rebases every branch in the stack, bottom to top.
  • An automatic option resolves conflicts as it goes and only stops when it needs help — and can be handed back the rest of the stack after you help.
  • Every message says where you are in the stack ("Branch 2 of 4"), not just where you are in the current rebase.
  • Offer to force push the rewritten branches when it's done.

Proposed experience

  • Entry points

    • PR in Pull Request Sidebar — Option to Rebase Stack... on PR Stack itself
    • Commit Graph — Rebase Stack… on the stack summary sheet (next to Merge Stack…), and Rebase Stack from Here… on a single layer's PR sheet.
    • Commit Graph branch details sheet / context menus — Rebase Stack alongside the existing Rebase This Branch Only.
    • Launchpad — Rebase Stack on a stacked item.
    • Command Palette and the rebase quick pick — Rebase Stack… / Auto-Rebase Stack…
  • Confirmation

    • Confirmation before execution showing the chain main a preview of conflicts as a normal rebase would, then options similar to a single rebase:
      • Rebase Stack — will stop at each conflict
      • Auto-Rebase Stack — AI resolves conflicts across every branch
  • While running

    • Cascades bottom to top without asking between branches, handles the checkouts (if it makes sense, put you back on the branch you started on.)
    • Continue with Auto-Rebase picks up the rest of the stack, not just the current branch.
    • Ensure messaging displays where in the stack the action currently is.
  • On completion

    • The summary's primary action is Force Push Stack, listing each branch (potentially have options to hold any back?)

Source: gitkraken/vscode-gitlens