Managing code changes using the trunk branch
When it comes to making use of the practice of trunk-based development, there are a few ways to do so. There are more extreme options available, along with some that should be familiar to those that follow the common Git Flow methodology.
This section covers both how to make changes using trunk-based development and some suggestions for how to tidy up the encapsulated implementations.
There are two approaches to how changes can be managed and what branching strategies will be used to achieve these changes. They are as follows:
- Only use the trunk branch.
- Use short-lived feature branches.
We will explain these two approaches in the following sections.
Using the trunk branch
When using only the trunk branch, this means that changes are made directly on the main branch, without going through release branches. This can be done with commits being made directly or via pull requests and the necessary reviews. The advantage...