🎁 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

GitHub Actions
A CI/CD platform integrated into GitHub that automates build, test, and deployment workflows using YAML configuration.
Artifact
A packaged, versioned output of a build process — such as a Docker image, JAR file, or compiled binary — ready for deployment.
Immutable Deployment
A deployment strategy where new versions replace existing instances entirely rather than updating them in place.
Container Registry
A storage and distribution service for container images, similar to a package repository but for Docker images.
Packer
A tool for creating identical machine images for multiple platforms from a single configuration file.
Microservices
An architectural style where an application is composed of small, independent services that communicate over APIs.
View All DevOps Terms →