Trunk branching strategy - AWS Prescriptive Guidance

Trunk branching strategy

Trunk-based development is a software development practice in which all developers work on a single branch, typically called the trunk or main branch. The idea behind this approach is to keep the code base in a continuously releasable state by integrating code changes frequently and relying on automated testing and continuous integration.

In trunk-based development, developers commit their changes to the main branch multiple times a day, aiming for small, incremental updates. This enables quick feedback loops, reduces the risk of merge conflicts, and fosters collaboration among team members. The practice emphasizes the importance of a well-maintained test suite because it relies on automated testing to catch potential issues early and make sure that the code base remains stable and releasable.

Trunk-based development is often contrasted with feature-based development (also known as feature branching or feature-driven development), where each new feature or bug fix is developed in its own dedicated branch, separate from the main branch. The choice between trunk-based development and feature-based development depends on factors such as team size, project requirements, and the desired balance between collaboration, integration frequency, and release management.

For more information about the Trunk branching strategy, see the following resources: