Clean rebasing for stacked PRs
Ok, stacked PRs, I love them but I've struggled to make them work in practice. Sure there are tools like GitButler and Graphite but I don't want to a) lost control of git or b) learn a new tool.
So, how can I make this work. Here is a strategy that works for small stacks at least. I have not tried to make it work with branches that are too many steps away from the main branch, but here goes.
main -> feature_branch_1 -> feature_branch_2
(where feature_branch_2 relies on changes from feature_branch_1)
Then when you merge feature_branch_1 -> dev, checkout the next branch in the stack feature_branch_2 and run git rebase --onto development feature_branch_1
Bye bye pesky merge conflicts that are just commit hash diffs.