简体   繁体   English

提交签名最简单的git工作流程?

[英]Simplest git workflow for commits signing?

Which would be the simplest git workflow for signing some commits, in order to mark them as having passed a given review, or a set of given reviews? 哪一个是签署某些提交以将其标记为已通过给定评论或一组给定评论的最简单的git工作流程?

I suppose tagging them would create too many tags. 我想标记它们会创建太多标记。 Creating an intermediate repository with a person responsible for committing (effectively using author/committer duality) would be a bit of overkill. 与负责提交的人员(有效地使用作者/提交者对偶)创建一个中间存储库可能会有些过头。

Is there any other way? 还有其他办法吗? We generally use the common structure of remote branches for bigger chunks of work, and direct commits in master for simpler ones. 我们通常使用远程分支的通用结构来处理更大的工作,而直接提交master来简化工作。

You could consider rebasing those commits on top of a review branch, but that would change the SHA1 of said commit, which is bad if they are already pushed to other repos. 您可以考虑在检阅分支的基础上重新部署那些提交,但这将更改所述提交的SHA1,如果它们已经被推送到其他存储库,那么这是不好的。

Creating an intermediate repository with a person responsible for committing 与负责提交的人员一起创建中间存储库

This is why a push to a dedicated repo is certainly a valid solution, taking advantage of the publication workflow authorized by a DVCS (Distributed Version Control System). 这就是为什么利用DVCS(分布式版本控制系统)授权的发布工作流程来推动专用回购无疑是有效的解决方案的原因。

You can then consider that repo as the "one referential", with the official code (ie code having been successfully reviewed). 然后,您可以将该回购视为带有正式代码(即,代码已成功审核)的“一个参照”。

You could take a look at the git notes feature. 您可以看一下git notes功能。 It allows you to attach notes to commits without changing the original objects. 它使您可以将注释附加到提交,而无需更改原始对象。

It's also supported by GitHub . GitHub也支持它。

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

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