Episode Details
Back to Episodes
Do Git Branches Actually Nest? AI Agents and Stacked PRs
Episode 5643
Published 2 weeks, 5 days ago
Description
Daniel asks whether the branch-per-feature rule still makes sense when an AI agent's whole session lasts five minutes, and whether branches can be nested for multi-agent repositories. The answer starts with a correction: in Git, branches are just pointers to commits — there is no parent-child relationship anywhere in the object model. What people call nesting is either a topology (branch B created from the tip of branch A) or a naming convention (slashes in a branch name are purely cosmetic). From there, the conversation traces the real history — Atlassian's Feature Branch Workflow, Vincent Driessen's Gitflow and its often-quoted sub-teams passage, and Martin Fowler's Patterns for Managing Source Code Branches, including Collaboration Branches, Team Integration Branches, and the idea that frequency reduces difficulty. Kent Beck's "illusion of frozen time" gets its due. Then the modern answer: worktrees for isolation, stacked pull requests for integration, and GitHub's own rule — nest exactly as deep as the dependency chain runs, and no deeper.
Episode #607247 — open it directly at myweirdprompts.com/607247