长期支持使用 git-flow 合并修补程序以开发支持分支的分支

Long term support using git-flow to merge a hotfix to develop branched off the support branch

正在为我的新项目进行 git 流程的实验学习。我注意到以下几点:

以下场景:

  1. 正常git-流量工作:

    git flow hotfix start 1.1.2

    将创建一个基于 master 的分支,完成后与 master 和 develop 合并。

  2. 基于另一个分支的分支

    git flow hotfix start 1.1.3 support/1.x

    但是随后基于支持分支创建的修补程序将合并回该支持分支,而不是返回到 develop 或 master,但在完成时将被标记。

问题

如果我的 master 分支当前在 v3.2.0 但修补程序是针对 v1.1 中引入的代码部分中的问题但仍然相关并在当前开发分支中使用,我该怎么办关于将它们合并在一起?

这个问题的原因是有些客户需要对特定旧版本的长期支持,即使您的新版本更优越。

可能是解决方案但不是(使用 SourceTree)

Atlassian SourceTree 始终仅将完成修补程序与 master 和 develop 合并,但从不与客户需要的支持分支合并 (测试三次)

If my master branch is currently in v3.2.0 but the hotfix was for an issue in a code section introduced in v1.1 but still relevant and used in the current development branch, how do I go about merging them together?

由于您不会将 hotfix 分支(问题已解决)合并到 master 中,您可以 cherry-pick 将相关提交返回到 master

log view (Cmd-2), just select one or more commit lines (Cmd-click or Shift-click multi-selects), then right-click and select 'Cherry pick'.