HeadlinesBriefing favicon HeadlinesBriefing.com

Moving from Gitflow to trunk-based development

DEV Community •
×

Teams using Gitflow often rely on `main`, `develop`, and long-lived feature branches due to insufficient automated tests. This creates friction, as the DEV stage is a moving target, forcing testers to wait for a stable INT stage every two weeks. The process leads to hotfixes, cherry-picks, and wasted effort.

The proposed fix introduces a TST stage, allowing a fixed state from `develop` to be tested before merging into `main`. However, this still requires branching and manual PRs. The author questions if `main` is truly necessary, suggesting we could simply tag commits in `develop` for release, eliminating the extra branch.

Calling the single branch `trunk` instead of `develop` reduces manual work and friction. This approach aligns with trunk-based development, paving the way for continuous delivery. By tagging and releasing directly from the primary branch, teams can streamline their workflow and focus on automation.