I'm having trouble to understand how to deal with the following scenario:
- Feature A is committed to
masteras commitA. - We are ready for release
v1.0.0so we tag commitAasv1.0.0and we create a release branchrel-1.0.xfrom it for QA. - Feature B is committed to
masteras commitB. - QA approves
v1.0.0, we deploy and delete therel-1.0.xbranch. - We are ready for release
v2.0.0so we tag commitBasv2.0.0and create arel-2.0.xbranch from it for QA. - A bug is found in production (
v1.0.0) and must be fixed and deployed right away.
At this point I'm not sure how we should handle that. If the bug is in the trunk we could create a hotfix branch from the trunk, fix the bug and merge into the trunk. Then, create a rel-1.0.1 branch from v1.0.0, cherry-pick the fix from the trunk, tag it as v1.0.1 and deploy.
Now what I find odd is that the v1.0.1 commit is not as-is in master given it's been cherry-picked from master and tagged in the rel-1.0.1 branch. Furthermore, if the fix is also needed in rel-2.0.x then how should we handle this? Should we cherry-pick the bug-fix from the trunk again and tag it as a different version, such as v2.0.1?
Here's the kind of graph I'd be getting doing the above (note that v1.1 represents version 2.0 of the text above and that it's the Second feature A fix that occurred while preparing the v1.1 release.):
