branching-strategies
A branching strategy is how a team uses branches in version control to develop features, run tests, and safely merge changes into the main codebase. It defines which branches exist, what they are used for, and the rules for merging into them.
One common and simple approach is feature branching:
When a new feature is started, the developer creates a new feature branch from main (for example, feature/add-reporting-page).
The developer pushes code to this feature branch. Automated tests run on the branch; if they pass (a “green” build), the change is considered ready to propose for main.
The developer opens a pull request from the feature branch into main. After review and passing tests, the feature branch is merged into main.
Once code is on main, another CI pipeline runs tests again on the integrated codebase. If those tests pass, the pipeline can automatically deploy the application to Azure.
Feature branches are usually short-lived. After they are merged, they can be deleted because main now contains the most up-to-date version of the project.
This strategy keeps main stable and deployable, while allowing developers to work independently on new features without breaking each other’s work.