3

Our current branching strategy is using three branches: default, release, hotfix.

hotfix is branched off release and then, following QA/testing, merged back into release, then into default.

When the next release is completed and another hotfix needs to be created, should we update the hotfix branch with the latest code or just force create a new hotfix branch from the latest release branch?

My instinct is to recreate the branch to be more explicit in when and why the branch was recreated. However, I'm not sure if there are any drawbacks to recreating the branch.

4

1 回答 1

3

您可以为每个发布/修补程序分支赋予其自己的名称,例如v1.0.0v1.0.0-hotfix。在下一次发布时,您可以关闭旧的发布/修补程序分支。

您还可以根据需要创建特定于修补程序的分支。当您确定一个新的修补程序时,给它一个名称和/或标识符,为它创建一个分支(例如hotfix-v1.0.0-001)并制作修补程序。接受后,将其合并release并关闭。

或者,如果您想保留当前release/hotfix命名方案,当您发布新产品时,将 default 合并到 release 然后 release 到 hotfix。因为您一直在将它们合并为默认值,所以您不应该遇到任何合并冲突。如果你这样做了,你就知道永远站在默认一边。

于 2012-09-04T21:11:24.740 回答