git flow如何处理较旧版本的修补程序或较旧版本的点发布 [英] How does git flow handle hotfix to older release or point release of older release

查看:211
本文介绍了git flow如何处理较旧版本的修补程序或较旧版本的点发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在master已远远超出该发行版之后,git flow如何处理修补程序?

How does git flow handle a hotfix after master has move far beyond that release?

场景

  1. 针对1.0的工作在开发上进行,在releases/v1.0发行分支上稳定下来,并通过标签v1.0(指向master的尖端和稳定分支的尖端)以快进合并的方式推送到master
  2. 发布1.1-3.2的方式几乎相同.
  3. 我们需要修复1.0中的错误

  1. Work for 1.0 performed on develop, stabilized on releases/v1.0 release branch and pushed to master in fast-forward merge with tag v1.0 pointing to tip of master and tip of stabilization branch
  2. Releases 1.1 - 3.2 take place in much the same fashion.
  3. We need to hotfix a bug in 1.0

  • 从v1.0标签开始分支
  • 执行修复
  • 合并到哪里?

Master的未来很遥远,任何合并都不会是一个快进,并且很有趣,比如说会发生冲突.

Master is far in the future and any merge wouldn't be a fast forward and for fun, let's say would conflict.

我将合并以发布稳定分支并制作新标签吗?那是以后的修补程序将用作其起点吗?

Would I merge to release stabilization branch and make new tag? Is that what subsequent hotfixes would use as their starting point?

推荐答案

nvie关于修补程序分支解释了这些……

nvie’s section on hotfix branches explains these are…

...非常类似于发行分支,尽管它们是计划外的,但它们也旨在为新的生产发行做准备.

… very much like release branches in that they are also meant to prepare for a new production release, albeit unplanned.

因此,当develop中的当前内容尚未为正常的release周期准备就绪时,就应该在最新的master版本的顶部进行操作.

So, they are meant to be done on the top of the latest master version, when current stuff in develop isn't ready for the normal release cycle.

您想要在这里修补旧版本的是support分支的概念,它在很早以前就发布了,但是最初的git流已经发布了,但是在很早以前就已经讨论过了.

What you want here for patching an older version is the concept of support branches, which was discussed a long, long time ago after the initial git flow past was publish but, afaik, never been throughly documented.

gitflow-avh工具似乎确实很好地支持了它们,因此您可能想在测试存储库中对其进行探索:

The gitflow-avh tool does seem to support them well, so you might want to explore it in a test repo:

我确实在support个分支上找到了一些带有信息"的帖子,但对它们的解释不太满意……由于缺乏有关它们的信息,我还是会链接它们:

I did find some posts with "information" on support branches but wasn’t too happy with their explanations… given the lack of information about them, i’ll link them anyway:

  • Getting Started – Git-Flow | Some thoughts, ideas and fun!!!
  • GitFlow Examples - GitVersion

这篇关于git flow如何处理较旧版本的修补程序或较旧版本的点发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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