What are the advantages/disadvantages of Branch per Release versus Code-Promotion Branches strategies?
The main reason why you branch is to isolate a development effort.
So that really depends what you deem most important to isolate:
- a promotion effort for a given release (which will isolate commits within that promotion step: testing, integration or prod/hotfixes)
- a release effort (which will include unit testing,integration,production phases all one after the other)
The Code-Promotion allows for parallel promotion efforts per release (you develop n+2 while testing n+1 and maintaining n).
While Branch per Release allows for a simpler more sequential development cycle where you mainly test and maintain n while developing n+1.
Whatever the chosen strategy is, you need to address the synchronization step between n and n+1 (what and when do you merge evolutions from n to n+1?):
- With Code-Promotion you can merge at different steps
- With Branch per Release, you generally merge only from one release to the current state of development for the other release.
So basically, the Code-Promotion strategy means more branches, more merge and more precisions in the history being kept and isolated in those branches.
But it means also more environment to setup and manage.
The Branch Per Release is more straightforward (provided you are able to know that what you are working on will actually end up being part of the next release).