这个问题在这里已经有了答案:
Git sign off previous commits?
(10 个回答)
3年前关闭。
Github 提供了通过 signing them with 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
关于github - 如何验证推送提交?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50400272/