Trunk-based development
Source: https://trunkbaseddevelopment.com
Trunk-based development is a branching model where all developers work on a single branch. This branch is often called main
or trunk
. The main branch is the source of truth for the project. Developers commit their changes directly to the main branch.
Shared branches off mainline/main/trunk are bad at any release cadence:

Source: https://trunkbaseddevelopment.com
Trunk-Based Development For Smaller Teams:

Source: https://trunkbaseddevelopment.com
Scaled Trunk-Based Development:

Source: https://trunkbaseddevelopment.com
Why trunk-based development?
- Simplicity: Trunk-based development is simple. There is only one branch to worry about.
- Speed: Trunk-based development is fast. Developers can commit their changes directly to the main branch.
- Feedback: Trunk-based development provides quick feedback. Developers can see the impact of their changes immediately. Continuous integration and automated testing help catch issues early.
- Collaboration: Trunk-based development encourages collaboration. Developers can work together on the same codebase.
- Quality: Trunk-based development promotes quality. It is an great enabler strategy for Continuous Integration and Continuous Deployment (CI/CD).
- Release: Trunk-based development makes releases easier. Developers can release new features with less overhead.
Why is this important?

Speed
Empirical evidence shows that high performing teams commit to the main branch more frequently, release more frequently, and have shorter lead times. They also have lower change failure rates and faster mean time to recovery.
This practice leads to faster feedback loops and higher quality code.
In short and maybe counter-intuitively—going faster and releasing more frequently actually leads to higher quality products.
Source: https://itrevolution.com/product/accelerate/
Advice: Use this branching strategy as the default option whenever possible. It is simple, fast, and promotes collaboration and quality.