Get the latest tech news
Working with stacked branches in Git is easier with –update-refs (2022)
In this post I discuss how to use the new Git rebasing feature, --update-refs, and how it makes working with stacked branches/PRs easier.
Creating separate branches and PRs for each unit of functionality makes it easier for people to consume and follow the "story" of the commits. There's a lot of finicky rebase commands to run there, you have to get the different "base" and--onto references right (they're different for each branch), and so it's (understandably) hard to convince people that this is a worthwhile endeavour. Using the approach from the previous section, I would need to checkout part-1, work out how to rebase it correctly onto dev and then repeat for each branch in the stack.
Or read this on Hacker News