Git Flow has been around for a long time and lots of people seem to be adopting it for as their favourite git workflow.
When it comes down to implementing Git Flow in a Java / Maven setting, I was wondering how one should approach versioning the software modules that live on all the branches below.
In a simplistic Maven world,
- developers always work on SNAPSHOT versions (ex: 0.0.1-SNAPSHOT)
- some release process create a release (0.0.1)
- A new snapshot version is made available for developers to develop on (0.0.2-SNAPSHOT).
If all you had was a Develop and Master branch this would be ok, but how do you handle maven versioning in GitFlow.
The versions on the master are pretty easy to define, as they will be the versions that are ultimately created and released from the Release branch.
But as soon as code goes to a release branch, what versioning strategy do you deploy here ?
- I guess we need to reserve a new version number on the release branch to avoid conflicts with Develop ? And how will that version number relate to whatever is on the develop branch.
- I assume that on the release branch there can also be multiple commits before the release goes into production. As we cannot re-use non-snapshot versions, do we increment fixed versions here with each commit, or also work with release-snapshot versions before finalising and pushing to master ?
- When we merge changes back from the release to the develop branch do we start a new snapshot version ?
release
andhotfix
branches. If the release needs weeks of manual testing (and bugfixing), it is hard to just have a master branch and nothing else. – M16