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 also10
Semantic Conflict
Two changes that merge cleanly and are incompatible in meaning.
Version Control & Delivery15 connections
Pull Request
A proposal to merge a branch, carrying review, automated checks, and the discussion around it.
Version Control & Delivery25 connections
Continuous Integration
Automatically building and testing every change, so integration problems surface immediately.
Version Control & Delivery38 connections
Version Control
A system recording the history of a project's files, enabling branching, merging, and recovery.
Version Control & Delivery26 connections
Three-Way Merge
Combining two lines of work by comparing both against their common ancestor.
Version Control & Delivery17 connections
Hotfix
An urgent fix shipped outside the normal release flow, how teams branch and backport it, and why the healthiest hotfix process is the normal process run fast.
Version Control & Delivery6 connections
Detached HEAD
The Git state in which the current checkout points directly at a commit rather than a branch, harmless for looking around but a trap for new work, since commits made there belong to no branch and can quietly disappear.
Version Control & Delivery11 connections
Cherry-Pick
Copying the change from one commit onto another branch as a new commit, the standard way to backport a fix without merging everything else that came with it.
Version Control & Delivery15 connections
Release Train
Shipping on a fixed schedule whether or not a given feature is ready, so features that miss one release simply wait for the next instead of holding everyone back.
Version Control & Delivery13 connections
Fast-Forward Merge
The two basic ways Git joins branches, by sliding a branch pointer forward or by recording a new commit with two parents, and how the choice shapes a project's history.
Version Control & Delivery14 connections
Linked from13
- Continuous IntegrationVersion Control & Delivery
Automatically building and testing every change, so integration problems surface immediately.
- Conway's LawVersion Control & Delivery
Systems tend to reproduce the communication structure of the organization that built them.
- Detached HEADVersion Control & Delivery
The Git state in which the current checkout points directly at a commit rather than a branch, harmless for looking around but a trap for new work, since commits made there belong to no branch and can quietly disappear.
- Fast-Forward MergeVersion Control & Delivery
The two basic ways Git joins branches, by sliding a branch pointer forward or by recording a new commit with two parents, and how the choice shapes a project's history.
- Feature BranchVersion Control & Delivery
A branch created to develop one change in isolation before merging it back, a workflow that keeps the main line stable but grows riskier the longer the branch lives, since its divergence from everyone else's work compounds.
- HotfixVersion Control & Delivery
An urgent fix shipped outside the normal release flow, how teams branch and backport it, and why the healthiest hotfix process is the normal process run fast.
- 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.
- Release TrainVersion Control & Delivery
Shipping on a fixed schedule whether or not a given feature is ready, so features that miss one release simply wait for the next instead of holding everyone back.
- 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.