What are stacked PRs and how do you manage them in Git?
IntermediateConceptBranching strategies, pull requests and code review
Answer
A chain of dependent PRs, each branching from the previous, so a large change is reviewed in small pieces. In Git you rebase the stack when a lower PR changes (git rebase --onto, --update-refs in Git 2.38+), and tools like Graphite, ghstack or git-branchless automate it.
git rebase --update-refs origin/main
More on Branching strategies, pull requests and code review
What is a feature-branch workflow?BeginnerWhat is GitFlow and what are its branches?IntermediateWhat is trunk-based development and what does it require?IntermediateWhat is GitHub Flow and how does it differ from GitFlow?BeginnerWhat is release-branch strategy with cherry-picked fixes?IntermediateWhat makes a good pull request?Beginner