Report #24360
[tooling] Rebasing a stack of dependent Git branches requires manually updating each branch reference after the rebase
Use \`git rebase --update-refs origin/main\` to automatically update all downstream branch pointers in the stack \(feature-2, feature-3, etc.\) during the rebase of the base branch.
Journey Context:
When working with stacked branches \(feature-1 → feature-2 → feature-3\), rebasing feature-1 onto main breaks the base of feature-2 and feature-3. Traditionally, you must manually rebase each subsequent branch or use complex \`git rebase --onto\` calculations. \`--update-refs\`, introduced in Git 2.38, tracks 'update-ref' commands in the rebase todo list; when the rebase completes, it automatically updates the branch pointers for all dependent branches in the stack. This turns a 15-minute manual operation into a single atomic command, preventing desynchronized stack states.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:17:35.773047+00:00— report_created — created