有没有办法获取每个签入存储库的人的列表并将其全部列在 sha256 字符串中?

Is there a way to get a list of every person who's checked into a repository and have it all listed in on sha256 string?

尝试使用一种代码来 return 已签入 GIT 存储库的所有用户的列表,并输出到一个 sha256 字符串中。这可能吗?

查找用户列表相对简单。这是我刚用过的 shell oneliner:

git log | grep ^Author | cut -d ' ' -f 2- | sort | uniq

向其中添加 | sha256sum 即可得到该列表的哈希值。

如果您只想散列名称或电子邮件地址或您有什么,您可以将参数修改为 cut

{ git shortlog -es --all; git shortlog -ces --all; } | cut -f2- | sort -u | sha256sum

git shortlog -es 列出每位作者的提交次数; git shortlog -ces 每个提交者。合并列表,删除第一列(提交数)并对列表进行排序。