简体   繁体   English

如何在简单的 git 流程中合并修补程序分支

[英]how to merge a hotfix branch in simple git flow

a team works on a simple git flow with release , develop , feature and hotfix branches:一个团队使用releasedevelopfeaturehotfix分支处理一个简单的 git 流程:

  • develop is based on release develop基于release
  • feature is based on develop feature基于develop
  • hotfix is based on release hotfix基于release

to merge the hotfix branch they have these options:要合并hotfix分支,他们有以下选项:

  1. merge hotfix into both release and develophotfix合并到releasedevelop
  2. merge hotfix into release then merge release into develophotfix合并到release ,然后将release合并到develop
  3. merge hotfix into release then rebase develop on top of releasehotfix合并到release ,然后在release之上重新develop

which option is the best and why?哪个选项最好,为什么?

I think you should merge hotfix into release (the branch it's based on), and then your develop branch should be updated based on release (the branch develop is based on) new state. And the same to feature : updated based on develop .我认为您应该将hotfix合并到release (它所基于的分支)中,然后您的develop分支应该根据release (分支develop基于)new state 进行更新。与feature相同:基于develop进行更新。 Disclaimer: this is my opinion.免责声明:这是我的意见。

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

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