I'm having trouble to understand how to deal with the following scenario:
- Feature A is committed to
master
as commitA
. - We are ready for release
v1.0.0
so we tag commitA
asv1.0.0
and we create a release branchrel-1.0.x
from it for QA. - Feature B is committed to
master
as commitB
. - QA approves
v1.0.0
, we deploy and delete therel-1.0.x
branch. - We are ready for release
v2.0.0
so we tag commitB
asv2.0.0
and create arel-2.0.x
branch 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.):
master
(e.g. v1.0.2 and v1.1.1)? Is that usual? I also often read that cherry-picks are to be avoided, but here I'll almost always cherry-pick bug fixes. It also annoys me that the introduction of the same fix yields two new hotfix version numbers. One for the currently released version and one for the release in preparation. – Halfwayrel-2.0
, it's ok merge or cherry-pick changes fromhotfix
torel-2.0
and then tag a new version. – Peh