github - 如何验证推送的提交?
问题描述
Github 提供了通过使用 GPG 对提交进行签名来验证提交的可能性。
完成此操作后,您将获得所有提交的验证/签名。但是,在执行此操作之前,我已经推送了提交。有没有办法验证/签署这些提交?
解决方案
这将涉及重写存储库的历史记录,或者使用:
git rebase -i
,git commit -S --amend --no-edit
在每次提交时进行编辑- 或一个
git filter-branch
。
类似this answer的内容,但使用您想要的任何标准:
git filter-branch --commit-filter 'if [ <some criteria> ];
then git commit-tree -S "$@";
else git commit-tree "$@";
fi' HEAD
推荐阅读
- java - java和ntdll.dll的关系
- npm - 如何解决 gulp watch 错误
- php - Wordpress Yoast 插件打开图表以从作者页面获取头像
- c# - 带有 Guid 的显式结构布局
- javascript - 如何在 node.js 中访问父对象的名称?
- sql - 什么样的 SQL 查询会得到想要的结果?
- javascript - window.getSelection().getRange(0) 在文本被包裹时不起作用
- netlogo - Netlogo:平均集群大小
- sas - Proc Transpose 每个组有多个 ID 值
- css - 我如何缩小以适应 SHOPIFY 中的横幅图像