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:
- 7.1.5: Two customers are using this
- 8.2.3: Three customers are using this
- 9.0.0: This is the next major version that you're currently working on.
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:
- develop and master: These are the branches for the current work. Anything that goes into the next major version is done here.
- Once we do a new stable release (e.g. 7.3.0), we create the following branches:
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.