问题描述
作为git的最佳实践,应该经常提交,但要查看可能需要检查由多个提交组成的补丁的代码。有没有办法可以一次检查多个提交并合并或拒绝?不,Gerrit目前不支持批处理承诺一个审查。但是,还有其他选项。
在$ DAYJOB,我的团队使用功能分支进行更大的更改。较小的提交会单独审查/合并到功能分支,但功能分支仅在所有事情都处于良好位置并且所有开发人员都很开心时才合并。
Gerrit还支持主题分支 - 这是组合相关提交的便捷方式。他们在中简要讨论。这些提交必须单独进行审查/合并,但可以在Web UI中快速组合。
As a git best practice, one should commit frequently, but to review the code you may need to review a patch consisting of multiple commits at once. Is there a way multiple commits can be reviewed and either merged or rejected at once?
No, Gerrit does not currently support batching commits into one review. However, there are a couple other options.
At $DAYJOB, my team uses feature branches for larger changes. The smaller commits are reviewed/merged to the feature branch individually, but the feature branch is only merged in once everything is in a good place and all developers are happy.
Gerrit also supports topic branches - which are a convenient way to group related commits. They are discussed briefly in the documentation. These commits must still be reviewed/merged individually, but they can be quickly grouped together in the web UI.
这篇关于Gerrit:将多个提交合并为一个“更改”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!