简体   繁体   English

GitFlow:何时删除或冻结功能/发布分支​​?

[英]GitFlow: when to delete or freeze feature/release branches?

Learning GitFlow and have some concerns that I haven't found answers to in any of the docs/articles I've read. 学习GitFlow并且在我读过的任何文档/文章中都有一些我没有找到答案的问题。

Per GitFlow, after the release branch has passed QA in some testing/staging environemnt, a production release occurs and the release branch gets merged into master (where it is also tagged w/ a version number) as well as back into develop . 根据GitFlow,在release分支在某些测试/暂存环境中通过QA之后,会发生生产版本,并且release分支将合并到master (其中还标记有版本号)以及重新 develop

I believe we ONLY need to merge back into develop IF bugs cropped up during the QA process that required changes being made directly to the release branch. 相信,我们只需要合并到develop ,如果一个bug时,需要直接做出更改的QA过程中出现了release分支。 Yes? 是? I assume if release contains nothing new on it that we don't need to merge it with develop again, right?! 我假设如果release中没有任何新内容,我们不需要再将它与develop ,对吧?!

I assume this also implies that when changes are made to release during testing/QA, that if they don't get merged back into develop , that we open ourselves up to regressions, right ? 我想这也意味着,当改变release测试/ QA过程中,如果他们没有得到合并到develop ,我们敞开心扉,接受回归, 对不对 Meaning that if the develop branch never gets the changes added to it that QA requested during testing, that if the release branch gets blown away, those changes are lost. 这意味着如果develop分支从未获得QA在测试期间请求的更改,那么如果release分支被吹走,则这些更改将丢失。

I'm also unsure of what GitFlow prescribes for actually " closing " branches (both feature branches and release branch alike). 我也不确定GitFlow为实际“ 关闭 ”分支(包括功能分支和release分支)所规定的内容。 After they are merged in, are feature branches deleted? 合并后,功能分支被删除了吗? Or somehow frozen for further revision? 或以某种方式冻结进一步修改? After merging into master / develop is release supposed to be deleted or frozen as well? 并入后, master / developrelease应该被删除或冻结呢?

I would always suggest that you follow the process and always attempt the merge of the release branch into develop. 我总是建议你遵循这个过程,并始终尝试将发布分支合并到develop中。 If there are no commits that don't exist on the develop branch, then git will inform you of this. 如果开发分支上没有提交,那么git会通知您。 You will have essentially have performed a no-op. 你基本上已经执行了无操作。

Correct, if you don't merge release to develop then you leave yourself open to regressions. 正确的,如果你没有合并发行版,那么你就会对回归开放。 Even if the release branch gets deleted, you will still have a history of the commits that made it onto master branch, so you would still be able to recover them, by cherry picking out the commits as required. 即使发布分支被删除,您仍然会有使其进入主分支的提交历史记录,因此您仍然可以通过根据需要挑选提交来恢复它们。

You would create a new feature and release branch for each thing. 您将为每个事物创建一个新功能和发布分支。 For example, feature/abc , feature/bdc , release/1.0.0 release/1.1.0 , etc. Once these features and releases are complete the branch is deleted and not used again. 例如, feature/abcfeature/bdcrelease/1.0.0 release/1.1.0等。完成这些功能和发布后,分支将被删除,不再使用。

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

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