We are doing a mobile app development and currently, we have Dev
- UAT
- Stating
- Main
branches.
We branch from the Main
branch as feature/fA
for feature development.
Do our development in that branch and when it is done we create a merge request to the Dev
branch. Go on with the tests and create a new merge request to the UAT
branch if it looks good.
If the feature is approved to go live we create a merge request to Staging
. Staging
acts as our release candidate branch.
After releasing the application we merge Staging
to Main
, tag the release and update any ongoing features with Main
.
Our problem is when we have multiple features going on at the same time, we face conflicts in our merge requests to Dev
, and UAT
.
While trying to solve these conflicts, we had to pull the code from Dev
and UAT
to our feature branches, which contain other features. Some of those features might not be going to release so this infects our feature branch.
Limitations:
We can't test each feature independently because we create test packages on a schedule and those packages need to contain multiple release candidate features.
Possible solutions that I found:
- Feature toggle
- Create an extra branch for each feature in order to merge to env. branches so if there is a conflict solving them won't affect the feature branch. But creates extra work and the way we solve conflicts in each branch and feature must be consistent.
Can you suggest a branching strategy that will minimize the conflict and/or keep our feature branches clean?
Dev
branch. I would focus instead on changing the process used for generating test packages so that your testing is concentrated on features instead, triggering the package process from your Feature branches.