What is the purpose of a release branch?

What is the purpose of a release branch?

The release branch helps isolate the development of an upcoming version and the current release. The release branch’s lifetime ends when a particular version of a project is released. Once this branch merges into the develop and main branches, it can be deleted.

What is a release branch?

A release branch is created from develop. Feature branches are created from develop. When a feature is complete it is merged into the develop branch. When the release branch is done it is merged into develop and main. If an issue in main is detected a hotfix branch is created from main.

Is develop branch necessary?

Thus, the actual answer to this question should be: You don’t necessarily need the develop branch if you adapt your workflow as described in the linked posts. Still, you wouldn’t merge your features into the release branches, but to the master branch, as you want them to be available in the future versions as well.

How do I pull from release branch?

git-flow: how to checkout release branch from origin?

  1. create the branch herself locally through git flow release start 1.0 and then git pull ?
  2. create a tracking branch locally through git with git checkout -b release/1.0 origin/release/1.0 and continue from there (does git flow work on the branch this way?)

Why is it important to have a release branch?

Release branches ensure that you have easy access to the code that you are currently using in production. They allow you to make isolated bug fixes and rapidly roll out “patches” to production without the risk of a fresh rollout from trunk. They are your most important bulwark against “losing” code that your business depends on.

When do release branches merge back into trunk?

Release branches are NOT merged back into trunk. That is usually when releases from succeeding release branches have gone live. This is a harmless tidying activity – branches can be undeleted again easily enough in all VCS choices.

Is it better to release from a trunk or a branch?

If the release cadence suits it, a cherry-pick of a bug fix from the trunk to the release branch and a point release from the same branch is fine. Releasing from a tag on the trunk is a decent optimization for many teams, if possible. The tag could be numbered for the release (say v1.1.1), and the branch can be avoided completely.

When to retire a branch for a release?

You should keep your old release builds around until software built from them is no longer in production, then retire them. Only release software to production if it was built off a release branch. This may seem obvious, but is the linchpin to a successful branch-for-release workflow.