GitFlow:release和master分支之间有什么区别? [英] GitFlow: what is difference between release and master branches?
问题描述
我刚刚看过此gitflow速查表.我不理解release
分支.
I've just took a look on this gitflow cheat sheet. I don't understand the release
branch.
有人可以告诉我release
和master
分支之间的区别吗?
Could anybody tell me the difference between release
and master
branches?
推荐答案
区别在于目标和过程.在准备即将发布的版本时,通常会创建一个release
分支.当所有应该发布的feature
分支都已合并到develop
分支时,可以在develop
分支上创建release
分支,并仅提交错误修复或对其进行一些配置更改.换句话说,您尝试使其尽可能稳定.当希望release
分支足够稳定时,您可以将其合并回develop
和master
分支. master
分支的目的是始终拥有可以部署到生产环境中的项目的最新稳定版本.您永远不会直接提交到master分支,只能从release
或hotfix
分支合并到它.还可以配置CI/CD工具以在master
分支中的任何更新上部署到生产环境.
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.
这篇关于GitFlow:release和master分支之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!