当我输入 git log
时,提交的结果列表在我的用户名后的括号 <> 中显示我的密码,如下所示:
commit 5ff14f929e2244f388a41b6f711e7b9b58c57cb2
Author: herman <MyPassw0rd>
Date: Wed Aug 29 10:00:39 2018 +0200
initial commit
为什么会这样,我该如何解决?
最佳答案
这不应该是您的密码,而应该是您的电子邮件。虽然我不知道您是如何在电子邮件设置中输入密码的,但您可以使用以下命令在当前项目中设置您的电子邮件
git config user.email "email@example.com"
或全局使用
git config --global user.email "email@example.com"
此外,您可能应该更改密码。
关于git - 为什么 git log 会显示我的密码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52076096/