GitFlow: what is difference between release and master branches?

后端 未结 3 1306
日久生厌
日久生厌 2021-02-04 01:20

I\'ve just took a look on this gitflow cheat sheet. I don\'t understand the release branch.

Could anybody tell me the difference between release

3条回答
  •  北荒
    北荒 (楼主)
    2021-02-04 01:56

    The difference is in goals and process. A release branch is usually created when you are preparing for an upcoming release. When all your feature branches which are supposed to be released have already been merged to develop branch you create release branch off develop branch and commit only bug fixes or some configuration changes to it. In other words you try to make it as stable as it's possible. When hopefully release branch is stable enough you merge it back to develop and master branches. The purpose of master branch is to always have the latest stable version of the project which can be deployed to production environment. You never commit directly to master branch, only merge to it from either release or hotfix branches. It is also possible to configure CI/CD tools to deploy to production on any update in master branch.

提交回复
热议问题