We are trying to adopt gitflow into our process at work. Gitflow is pretty simple when it comes to hotfixes. However, I'm unclear on how I would fix a bug on a previous version of our system.
For example, let's just say we're on version 8.1.3 and I need to make a bugfix to 7.1.5. I could create a branch based on the 7.1.5 tag, but then how do I get that back into master and tag it? Is that even possible using Git? I was thinking of just keeping the release branches and commit and tag there, but I'm not sure if that is the proper way to do things.
Git-flow in its original model does not talk about supported major versions at the same time. It does not describe a model where you have the following versions in production:
In Git-flow, the master branch is your currently supported, released version, everything else is old and considered legacy.
Having said that, and since we're in the same situation, where we have to support multiple major versions at the same time (at least one where we provide bug fixes, and one where we provide new features), we have come up with the following:
These branches now become the develop and master branch for this supported release. Any fixes we need to do on v7.3.0 are done in the 7.3/develop branch, and once we create release v7.3.1, it's done on 7.3/develop and 7.3/master.
Changes that need to be done in both develop branches are usually cherry-picked, since we don't want to merge the new features from develop into an older, but still maintained develop branch.
This process takes a bit of setup, but it works quite well, and as long as you remember to create the required branches when you start working on the next stable version, it's not too much overhead.
one way could be:
not sure this is the best way, but a possibility.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With