← Home · ↑ October 2024 · Bookmark #29947

Working with stacked branches in Git is easier with --update-refs

In this post I described the new --update-refs feature for rebasing in Git 2.38. I introduced the concept of stacked branches and stacked PRs, and why I like them for feature development. Unfortunately, keeping stacked branches up to date can be quite arduous, requiring a lot of tricky rebasing. with --update-refs the commands are significantly simplified, as I showed in various scenarios. You can even enable --update-refs by default, so that all your rebases use it!
Saved on