简体   繁体   English

如何使用gitflow修补程序分支

[英]how to use a gitflow hotfix branch

We started using Gitflow for our branching model. 我们开始将Gitflow用于我们的分支模型。 But we are not sure how to use hotfixes. 但是我们不确定如何使用修补程序。 Do we have to use 1 hotfix branch for a hotfix release (meaning multiple fixes in 1 branch) or do we have to use 1 branch for every hotfix. 我们是否必须使用1个修补程序分支来发布修补程序(意味着1个分支中有多个修补程序),还是必须为每个修补程序使用1个分支。 So if there are 10 bugs, we have 10 hotfix branches. 因此,如果有10个错误,我们有10个修补程序分支。

In reference to this article by Atlassian , following points can be derived: 参考Atlassian的这篇文章,可以得出以下几点:

  • Hotfix branches are created for bugs in production releases. 修补程序分支是为生产版本中的错误创建的。
  • This branch is used as patch for next release cycle. 该分支用作下一个发行周期的补丁。

From these points it can be understood that all the bugs for a production release should be resolved in a single hotfix branch. 从这些角度可以理解,生产版本的所有错误应在单个修补程序分支中解决。

NOTE: Care should be taken that after all the production bugs are resolved, the updated code is merged back to the develop and master branch. 注意:应注意在解决所有生产错误之后,将更新的代码合并回到dev和master分支。 After merge make sure the hotfix branch is deleted. 合并后,请确保删除了修补程序分支。 The develop branch can then be used to generate next release in the release cycle. 然后,develop分支可用于在发布周期中生成下一个发布。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM