When to increment versions in a git branching model

Currently using http://nvie.com/posts/a-successful-git-branching-model/ which works well.

One point that I don't fully understand is how to handle patches that are made during the creation of the release branch.

If it was a normal fix, I would detach master, perform the fix, and then merge into both master and release. However, if this is a fix to be included in my current version, am I debugging the release and then merging with the merge object again, or am I just fixing a bug on the release branch? Do I increment the version number for each fix I complete on the release branch?

+3


source to share


1 answer


One point that I don't fully understand is how to handle patches that are made during the creation of the release branch.

According to the Git Flow model, fixes

stem from the need to act immediately after the unwanted state of the live version.

If, while working on a release branch, you needed a fix so bad (for example, a high security risk) that you couldn't wait for the release branch to complete, Git Flow prescribes that you do the following:

The only exception to the rule here is that when a release branch currently exists, the fix changes need to be merged into that release branch instead develop

.
Back-merging bugfix on the release branch will eventually result in the patch being merged into the develop

same when the release branch is complete. (If the work in develop

immediately requires this fix and can't wait for the release branch to complete, you can safely merge the fix into develop

now.)

(Thanks for correcting me on this , I completely forgot about this exception.)


However, if this is a fix to be included in my current version, am I disabling the release and then merging with the merge object again, or am I just fixing a bug in the release branch?



As I understand it since you wrote

[if] this is a regular fix [...]

this fix is ​​not very urgent and should not be considered a fix. In that case, why not just do it directly in the release branch? In the end, according to Git Flow , what's for the release branches:

Disable support branches for preparing a new release. They allow last-minute point and cross ts. They also allow minor bug fixes and prepare release metadata (version number, build dates, etc.).


Am I incrementing the version number for each fix I complete on the release branch?

Not. The version number is set as a stone as soon as a release branch is created. Committing something to the latter should not change the version number.

+1


source







All Articles