Search code examples
gitreleaserelease-managementgit-flow

In which branch should a beta release be tagged?


In which branch should a beta release be tagged according to git-flow?

We have a release branch for preparing Version x.0.0, but before releasing x.0.0 we want to release a beta (x.0.0-beta). Should the release branch be merged into master in this case and then be tagged x.0.0-beta on master or should this beta release be tagged on the release branch for x.0.0?

Additional question: Is the procedure for a release candidate (x.0.0-rc1) the same as for beta?


Solution

  • I would suggest that you would place the x.0.0-beta tag on the release branch, once you are ready to ship the beta version, somewhere. You might actually want to go further and tag it with x.0.0-beta0001 so that you can have multiple beta version, as required.

    Once you move closer to the release, you would tag the release branch with the x.0.0-rc1 as required as well.

    Then, once you merge the release branch into master, and ultimately back into develop, you would tag the master branch with the final version number.

    This approach was taken from the implementation of git-flow in the GitVersion utility, which is documented here:

    https://gitversion.net/docs/learn/branching-strategies/gitflow/examples