Learn the vocabulary of integrating small, frequent commits directly into a single shared trunk.
0 / 5 completed
1 / 5
At standup, a dev mentions that every developer integrates small, frequent commits directly into a single shared main branch, rather than working in isolation on a long-lived feature branch that only merges back weeks later. What is this branching workflow called?
Trunk-based development is exactly this: it is a workflow where every developer integrates small, frequent commits directly into a single shared trunk, or main branch, rather than working in isolation on a long-lived feature branch that only merges back weeks later. A hash collision is an unrelated hash-table concept about two keys sharing a bucket. This frequent-small-integrations-into-one-trunk approach is exactly why trunk-based development avoids the large, high-risk merges that long-lived feature branches eventually require.
2 / 5
During a design review, the team adopts trunk-based development for a project that previously suffered painful, conflict-heavy merges, specifically because integrating small commits directly into main every day means no single merge ever has to reconcile weeks of divergence at once. Which capability does this provide?
Trunk-based development here provides small, low-risk integrations instead of large, conflict-heavy merges, since committing directly into main every day means no merge ever has to reconcile weeks of accumulated divergence between a feature branch and main at once. Working in isolation on a long-lived feature branch for weeks before merging lets main and the feature branch drift apart substantially, so the eventual merge has to reconcile all of that accumulated divergence in one high-risk event. This integrate-small-and-often behavior is exactly why trunk-based development is favored over long-lived feature branches for teams that have suffered painful merges.
3 / 5
In a code review, a dev notices a team works in isolation on feature branches that routinely live for six or more weeks before merging, with main and each feature branch drifting substantially apart in the meantime, instead of integrating small commits directly into main frequently. What does this represent?
This is a missed trunk-based-development opportunity, since integrating small commits directly into main frequently would avoid the large, high-risk merges that six-week-old feature branches eventually require. A cache eviction policy is an unrelated concept about discarded cache entries. This long-lived-branch-with-substantial-drift pattern is exactly the kind of merge risk a reviewer flags once a team has already experienced painful, conflict-heavy integrations.
4 / 5
An incident report shows a six-week-old feature branch's eventual merge into main broke several unrelated features, because main and the feature branch had drifted substantially apart in the meantime, and the resulting merge had to reconcile weeks of accumulated divergence all at once. What practice would prevent this?
Adopting trunk-based development means small commits integrate directly into main frequently and no merge ever has to reconcile weeks of accumulated divergence at once. Continuing to let feature branches live for six or more weeks before merging regardless of how many unrelated features break during the eventual large merge is exactly what caused the breakage described in this incident. This integrate-frequently-into-trunk approach is the standard fix once long-lived branches are confirmed to cause painful, high-risk merges.
5 / 5
During a PR review, a teammate asks why the team adopts trunk-based development instead of continuing with long-lived feature branches, given that feature branches let a developer work in isolation without affecting main until they're fully ready. What is the reasoning?
Trunk-based development trades the isolation of a long-lived feature branch for small, frequent integrations that keep divergence from main minimal, avoiding the large, high-risk merge that a long-lived feature branch eventually requires, while long-lived feature branches offer more isolation upfront but let main and the branch drift substantially apart, guaranteeing a harder reconciliation later. This is exactly why trunk-based development is favored by teams that have been burned by painful, conflict-heavy merges from long-lived branches.