gpt4 book ai didi

git - user.name 和 user.email 到底是如何链接到提交的?如何从提交中获取这些?

转载 作者:太空狗 更新时间:2023-10-29 14:32:08 24 4
gpt4 key购买 nike

我记得很久以前我读到过为 git 提交设置电子邮件会让你收到垃圾邮件。

user.email 和 user.name 到底是如何链接到提交的?是否可以通过克隆项目或查看项目来查看它们?

有没有办法以未经授权的方式获取电子邮件?

最佳答案

这是一个提交的结构,你可以看到名称和电子邮件是提交数据的一部分

enter image description here


Is it possible to view them by cloning the project, or viewing it?

git log 

它将显示提交消息以及您在图像中的绿色框中看到的所有其他元数据。


Is there a way of getting hold of the email in an unauthorized way?

没有。你可以通过传递 git commit -c user.name "aaa"-c user.email "a@a.net" 使用你想要的任何电子邮件 -c 将覆盖配置文件中可能包含的任何配置。

关于git - user.name 和 user.email 到底是如何链接到提交的?如何从提交中获取这些?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34511269/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com