Understanding trunk-based development
A very common approach to building software is to use the Git Flow (GitKraken's definition: https://www.gitkraken.com/learn/git/git-flow) branching strategy to manage the source code and ensure there is good version control of the software changes. The name comes from the opportunity to make use of branches within the Git SCM tool and ensuring that changes flow through a series of branches before reaching production.
The approach was first introduced in 2010 to simplify release management by isolating different types of work into different branches. I will outline how this approach works before explaining why a trunk-based approach can be a better way of working with Git and branches. Git Flow follows the principle of having the following types of branches:
- Main: The main branch (often referred to as the master branch, but this is now an outdated term) is the trunk of the Git branches. This is the production-ready branch where tested...