GitFlow:release和master分支之间有什么区别? [英] GitFlow: what is difference between release and master branches?

查看:2634
本文介绍了GitFlow:release和master分支之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚看过此gitflow速查表.我不理解release分支.

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

有人可以告诉我releasemaster分支之间的区别吗?

Could anybody tell me the difference between release and master branches?

推荐答案

区别在于目标和过程.在准备即将发布的版本时,通常会创建一个release分支.当所有应该发布的feature分支都已合并到develop分支时,可以在develop分支上创建release分支,并仅提交错误修复或对其进行一些配置更改.换句话说,您尝试使其尽可能稳定.当希望release分支足够稳定时,您可以将其合并回developmaster分支. master分支的目的是始终拥有可以部署到生产环境中的项目的最新稳定版本.您永远不会直接提交到master分支,只能从releasehotfix分支合并到它.还可以配置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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆