Currently we have the following branches:
- Develop
- Release 1
- Release 2
- etc..
- Master
When we want to cut off new features for a release, we create a new release branch (say release 3). We then only apply bug fixes etc. to the release branch and no more major changes.
When release 3 has been tested and everything is ready, we lock down Release 3 from further changes then merge it into master and release master into production.
My question is, do we really need a master branch? Why can we not release straight from Release 3 into production.
It seems merging into master first only adds more work and extra risk/testing requirements to ensure we did not do a "bad" merge from Release 3 to Master.
The other perceived benefit from my point of view is releasing straight from the Release 3 branch means that if something goes terribly wrong and we decide to rollback, we can simple re-release the Release 2 branch into production, then continue making fixes on Release 3. This seems easier than having to rollback master.
I've tried looking this up but have only found information on what the difference between release branches and master branches are, but not much on if/why we need both of them.
Edit: The reason we normally keep multiple release branches is that we often end up with 2 or more "release-worthy" sets of development that are ready for the testing phase. E.g. The testing team might be working on Release 1, and development have just finished the Release 2 work. We do not want to merge the Release 2 and Release 1 work together because the will effectively restart the testing phase and prolong the release. So instead we create a new release branch for the release 2 work.