# Trunk-Based Development

> Everyone merges small changes into one main branch. They do it at least once a day.

**Field:** Software Development  
**Category:** Version Control  
**Also known as:** Trunk-Based, TBD, Trunk Development

## Think of it like

Think of it like a team writing one story. Each person adds a line or two a day, so it stays one story.

## Definition

Trunk-based development is a strategy where everyone works on one main branch, called the trunk. Branches, if used, are tiny and short. The usual rule is to merge to the trunk at least once every 24 hours. Half-done features hide behind feature flags. Tests run on every merge to keep the trunk working.

## Example

Jack's team merges a dozen small changes into main each day. Each one is tested, so main is always ready to ship.

## Why it matters

Small daily merges mean tiny conflicts. That is what lets a team ship every day.

## Common mistake

Merging daily without good tests. A broken trunk then breaks everyone at once.

## Three principles

- **One trunk.** Everyone shares one main branch.
- **Merge daily.** At least once every 24 hours.
- **Flags hide work.** Unfinished features stay switched off.

## Related terms

- [Branching Strategy](https://learn.benibix.com/term/development/branching-strategy)
- [Git Flow](https://learn.benibix.com/term/development/git-flow)
- [Main Branch](https://learn.benibix.com/term/development/main-branch)
- [Feature Flag](https://learn.benibix.com/term/development/feature-flag)
- [Continuous Integration (CI)](https://learn.benibix.com/term/development/continuous-integration)

## Taught in

- [Git Branching Strategies](https://learn.benibix.com/learn/development-version-control/git-branching-strategies): Git and GitHub, 13/13

![Two panels. Trunk-based development, lit up: one main line with many tiny branches that each rejoin it within a day. Git Flow: five lines, main, develop, feature, release and hotfix. Features join develop, a release branch moves develop into main, and a hotfix goes straight from main back into both. A note says fewer, shorter branches mean fewer merge conflicts.](https://learn.benibix.com/diagrams/dev3-git-workflows.svg)

---

Source: https://learn.benibix.com/term/development/trunk-based-development
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
