简体   繁体   English

开源项目中 gitflow 的最佳实践

[英]Best practices for gitflow in an open source project

I'm starting to work on an open source project at work and we're trying to establish a healthy gitflow branching strategy.我开始在工作中从事一个开源项目,我们正在尝试建立一个健康的 gitflow 分支策略。

Currently, the best option I've found is the " GitLab workflow with release branches ".目前,我发现的最佳选择是“ 带有发布分支的 GitLab 工作流”。 Git Flow Image Git 流图

It seems ok but there are a few questions that come up with this method:看起来没问题,但是这种方法有几个问题:

  1. What happens when I fix a bug in an older version, let's say: v1.2.0 -> v1.2.1 .当我修复旧版本中的错误时会发生什么,比如说: v1.2.0 -> v1.2.1 Do I need to cherry-pick the commit to all the newer versions?我是否需要cherry-pick对所有较新版本的提交?
  2. How to deal with release candidates?如何处理候选发布者? Do I branch from the release branch: v1.2rc_1 or are there better practices for that?我是从发布分支分支: v1.2rc_1还是有更好的做法?

Thanks!谢谢!

  1. Does it really makes sense to fix bugs for older version?修复旧版本的错误真的有意义吗? In most cases - especially for open source projects - bug fixes are introduced into the newest commits.在大多数情况下——尤其是对于开源项目——错误修复被引入到最新的提交中。 It makes sense to fix bugs for particular versions if you had some breaking changes, and users can't simply upgrade to the latest software.如果您有一些重大更改,则修复特定版本的错误是有意义的,并且用户不能简单地升级到最新软件。 So it also depends on how your software is distributed and used.因此,它还取决于您的软件是如何分发和使用的。
  2. Release branch is release candidate itself already.发布分支本身已经是发布候选。 That is the code, which you are going to release.这就是你要发布的代码。 And after that, released code will be merged to master at the end.之后,发布的代码将在最后合并到 master。 So no additional branches from release branch are needed in git flow model.因此在 git 流 model 中不需要来自发布分支的额外分支。

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

相关问题 AWS textract 表单设计最佳实践 - Aws textract form design best practices 防止陈旧 CSS 和 JavaScript 的最佳做法是什么 - What are best practices for preventing stale CSS and JavaScript 了解在 GoLang 中处理返回的指针和错误检查的最佳实践 - Understanding best practices for handling returned pointers in GoLang and error checking 在 gitlab CI/CD 中使用 GOOGLE_APPLICATION_CREDENTIALS 的最佳实践 - Best practices for using GOOGLE_APPLICATION_CREDENTIALS in gitlab CI/CD 在 asp.NET MVC 中存储 API 访问密钥的最佳实践 - best practices for storing API access keys in asp.NET MVC 云 SQL Postgres - 管理数据库用户,最佳实践? - Cloud SQL Postgres - Managing Database Users, Best Practices? 使用 Lambda + pymysql 连接到 AWS RDS 时的最佳实践? - Best practices when connecting to AWS RDS with Lambda + pymysql? AWS 上托管的 .NET Core 后台服务的最佳实践 - Best practices for .NET Core's BackgroundServices hosted on AWS 项目的结算帐号未打开 GCP - Billing account for project is not open GCP 使用 Flutter Firestore 插件时的最佳做法是什么? 是否应该避免创建多个实例? - What are the best practices when using Flutter Firestore plugin? Should creating multiple instances be avoided?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM