Reputation: 46118
I've been looking at using git flow, but there seems to be a hole in the original design around hotfixes.
Say you've done several releases - your master has tags for 0.1, 0.2, 0.3, 1.0, 1.1, 2.0, etc. You find a bug in 0.2, and want to do a release 0.2.1 with a fix. Where does the release tag go? It can't go onto master, as that's on version 2.0. Does it just go on the hotfix branch? And can that branch then be used to create a 0.3.1 and 1.1.1 release in a similar way, with the tag on the 1.1.1 hotfix branch, and merged into a pending release branch?
Upvotes: 1
Views: 429
Reputation: 14498
Even though the original gitflow never "upgraded" the support branches you will run into another problem. The original git-flow does not let you create a hotfix from a support branch to start with.
To start of, I'm assuming you use Semantic Versioning 2.0.0 as in x.y.z
To answer your question as I see it: You use support branches for releases, now the question of course is how many support branches would you keep and create. Personally, if you would support older versions, I would keep branches for x.y releases.
Tags would go on on the support branches.
If a hotfix needs to be implemented all the way up the releases, there are two ways you could do this:
If the hotfix is only one commit I guess you could do a Cherry Pick, if it's more I would go for creating patches with git format-patch
and use git am
to add them to other branches.
Now again to be able to create a hotfix/bugfix/release branch from a support branch you need to use gitflow AVH Edition (Disclaimer: I developed gitflow AVH Edition)
Upvotes: 1