🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

DevOps Intermediate

What is Trunk-Based Development?

A source control strategy where developers integrate small changes directly into the main branch frequently, often multiple times per day.

Trunk-based development minimizes merge conflicts and enables continuous integration by having all developers commit to a single shared branch (trunk/main). Short-lived feature branches (lasting hours, not days) are permitted but must merge quickly. This approach requires strong automated testing, feature flags for incomplete work, and code review practices. It enables continuous deployment since the trunk is always in a deployable state. Google, Facebook, and other tech giants practice trunk-based development at massive scale. It contrasts with GitFlow where long-lived branches can diverge significantly.

Related Terms

Incident Management
The process of detecting, responding to, and resolving service disruptions to minimize impact and restore normal operations.
YAML
A human-readable data serialization language commonly used for configuration files in DevOps tools and applications.
Docker Compose
A tool for defining and running multi-container Docker applications using a YAML configuration file.
Observability
The ability to understand a system's internal state from its external outputs through metrics, logs, and traces.
Blue-Green Deployment
A deployment strategy using two identical environments where traffic is switched from the old version to the new one instantly.
Continuous Deployment
A practice where every code change that passes automated tests is automatically deployed to production.
View All DevOps Terms →