Re:Stacked Diffs (and why you should know about them)
by Liskni_si on Thursday October 26, 2023 @07:43AM
(#38024278)
Re
> 1. … You'll need some rebase-fu to handle that, and the pain is significant if the chain is long.
`git rebase --update-refs` on the last branch will handle updating of all the intermediate branches in the stack, you just need to force-push them all at the end.
It does help with 2. as well, but you will indeed need to manually update the target branch of a single PR on GitHub.
1. If you edit A after reviewer comments, B will now have a dangling source. You'll need some rebase-fu to handle that, and the pain is significant if the chain is long. In stacked-diff workflow, it is handled automatically.
2. If you need to insert a new PR between A and B, or swap the order of some PRs in the chain, you'll need to manually do a lot of rebase-fu, and possibly manually updating the "target branch" on github. While in a stacked-diff workflow, all of these are handled automatically.