Report #7985
[tooling] Rebasing a stack of dependent branches requires manually updating each branch reference
Use \`git rebase --update-refs\` \(Git 2.38\+\) when rebasing a feature branch that has dependent branches; Git automatically updates the refs of the stacked branches to point to the new commits.
Journey Context:
Without this flag, rebasing \`main\` onto \`origin/main\` breaks all branches stacked on top of it \(\`feature-a\`, \`feature-b\`\), requiring manual \`git reset --hard\` or \`git rebase\` for each. People often use \`git rebase --onto\` manually or create throwaway branches as backups. \`--update-refs\` treats branch refs as pointers that should move with the rebase operation, maintaining the stack integrity automatically. This is the correct approach for trunk-based development with stacked PRs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:16:32.947927+00:00— report_created — created