How stacked PRs work behind the scenes at GitHub | S02E05 | The GitHub Podcast
Sameen Karim joins The GitHub Podcast to explain how GitHub’s native stacked pull requests work, including the internal merge architecture changes, how linked PR chains avoid “ghost merges,” and how the team addressed CODEOWNERS-related security loopholes while keeping stacked review workflows practical for engineering teams.
Overview
In this episode, Cassidy and Andrea talk with Sameen Karim (Senior Product Manager at GitHub) about native stacked pull requests and what it took to build them into GitHub.
Key themes covered in the episode description include:
- What stacked pull requests are and why teams use them to break large changes into smaller, reviewable PRs.
- Rebuilding legacy merge box systems to support stacks.
- Handling “ghost merges” across linked PR chains.
- Closing CODEOWNERS security loopholes related to stacked/linked PR behavior.
- How teams can adopt stacked PR workflows in practice.
- Related tooling, including the open source gh-stack CLI.
Links mentioned
- GitHub Universe: https://githubuniverse.com/?utm_source=YouTube&utm_medium=Social&utm_campaign=podcastgh_uni_26
- Sarah Drasner's code drawings: https://sarah.dev/projects/
- AGENTS.md: https://github.com/agentsmd/agents.md
- gh-stack CLI: https://github.com/github/gh-stack
Episode chapters
- 00:00 Welcome to The GitHub Podcast
- 01:16 Sameen's path to GitHub
- 02:13 What are stacked pull requests?
- 06:41 The long road to stacked PRs
- 13:10 Core architectural decisions
- 17:31 Benefits of native stacked PRs
- 23:41 Adopting stacked PR workflows
- 28:09 Future of stacked PRs & PR experience
- 31:55 Ubiquitous access & developer choice
- 33:34 Community feedback & project picks