Branching Model
The convention governing what branches exist, what they mean, and how work reaches production.
A branching model is the agreed answer to what branches a project has, what each means, and how a change travels from a working copy to production. It is a social convention rather than a technical constraint — the tool permits nearly anything.
The main families are long-lived release branches with staged promotion, which suit software shipped in versions to customers who upgrade on their own schedule; and Trunk-Based Development, where everything merges to one integration branch continuously, which suits software deployed constantly.
What matters more than the choice is that the model is stated and current. A stale model is a specific and expensive hazard: documentation naming an integration branch that has since been superseded sends people to branch from something that no longer receives changes, and the resulting work merges badly or not at all. When an integration branch changes, every reference to it — documentation, tooling configuration, continuous-integration conditions — has to change too, and the ones that do not fail quietly. See Documentation Rot and Silent Failure.
The model also determines what a merge means and therefore what history looks like; see Squash Merge and Merge Train.
See also4
Hand-picked in the note itself — the neighbours worth reading next.
Trunk-Based Development
Everyone integrating into one shared branch continuously, with short-lived feature branches.
Version Control & Delivery12 connections
Pull Request
A proposal to merge a branch, carrying review, automated checks, and the discussion around it.
Version Control & Delivery13 connections
Continuous Integration
Automatically building and testing every change, so integration problems surface immediately.
Version Control & Delivery17 connections
Version Control
A system recording the history of a project's files, enabling branching, merging, and recovery.
Version Control & Delivery13 connections
Related2
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from7
Notes elsewhere in the wiki that reach for this one.
- Continuous IntegrationVersion Control & Delivery
Automatically building and testing every change, so integration problems surface immediately.
- Merge TrainVersion Control & Delivery
Validating changes against the state they will actually merge into, in order, rather than in isolation.
- Pull RequestVersion Control & Delivery
A proposal to merge a branch, carrying review, automated checks, and the discussion around it.
- Squash MergeVersion Control & Delivery
Collapsing a branch's commits into one before merging, trading granularity for a clean main history.
- Stacked Pull RequestsVersion Control & Delivery
A chain of dependent changes, each reviewed separately and merged in order.
- Trunk-Based DevelopmentVersion Control & Delivery
Everyone integrating into one shared branch continuously, with short-lived feature branches.
- Version ControlVersion Control & Delivery
A system recording the history of a project's files, enabling branching, merging, and recovery.