On http://nvie.com/posts/a-successful-git-branching-model/ it says:
Release branches are created from the develop branch. For example, say version 1.1.5 is the current production release and we have a big release coming up. The state of develop is ready for the “next release” and we have decided that this will become version 1.2 (rather than 1.1.6 or 2.0). So we branch off and give the release branch a name reflecting the new version number:
$ git checkout -b release-1.2 develop Switched to a new branch "release-1.2" $ ./bump-version.sh 1.2 Files modified successfully, version bumped to 1.2. $ git commit -a -m "Bumped version number to 1.2" [release-1.2 74d9424] Bumped version number to 1.2 1 files changed, 1 insertions(+), 1 deletions(-)
Now I have a number of issues with that:
Even then, actually I want my development branch to have a version number that clearly indicates that this is a development version (because no one who finds a generated "myproject-1.2.jar" file somewhere should consider for a second to run this jar file in a production environment). So from the moment I create the release branch I would like the version numbers to reflect "this is version 1.2.0" and "this is a development version based on 1.2".
Unfortunately, when creating the release branch, bumping the version number to "1.2" there and to something like "1.2+dev" on the development branch will result in a conflict every time I will try to merge changes from the release branch back into develop. Do you have any advice how to get this kind of versioning in place using git?
According to your gitversion. yml file, the only releasable branch is release branch. The semver you get from every commit from those release branches will have a beta tag added. Even if you name your release branch like releases/v1.2.3 , you will get 1.2.
The release branch represents a complete feature set. The only commits on the release branch are for bug fixes and important chores. The Gitflow release branch is created off the development branch. Gitflow release is merged into master and also back into development.
The GitHub flow branching strategy is a relatively simple workflow that allows smaller teams, or web applications/products that don't require supporting multiple versions, to expedite their work. In GitHub flow, the main branch contains your production-ready code.
It seems like the following workflow is actually able to realize the desired versioning in git:
<last-release>+dev
.<next-release>
and commit.releases/v<next-release>
from develop.<next-release>+dev
and commit.releases/v<next-release>
branch into master and tag it.This way,
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