Report #55144
[tooling] Rebasing a stack of dependent feature branches requires manually rebasing each branch individually after updating the parent
Use \`git rebase --update-refs \` to automatically rebase all descendant branches in a stack when rebasing the parent, maintaining the chain of dependent branches in a single command.
Journey Context:
Developers using stacked PRs \(feature-a → feature-b → main\) face tedious manual work when main updates. Traditionally, you checkout main, pull, checkout feature-a, rebase, checkout feature-b, rebase onto feature-a, repeating for N branches. This is error-prone and loses branch tracking. \`--update-refs\` \(Git 2.38\+\) detects branches pointing to commits in the rebased range and updates them automatically. This transforms stacked branch maintenance from O\(N\) commands to O\(1\), essential for workflows like GitHub's stacked PRs, ghstack, or sapling/spr. Without this, developers often squash stacks prematurely or avoid branching strategies that would improve code review quality. The flag requires recent Git versions but is backward compatible \(ignored by older clients if not used\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:03:07.588382+00:00— report_created — created