GitHub帐户的用户名不会显示为提交的作者

时间:2015-02-06 19:12:14

标签: git github

最近我注意到我在gitHub中对git存储库的所有提交都显示错误的名称(not my account user name, which normally a hyperlink to my profile

因此会出现蓝色问号,其中有一个工具提示 "Invalid author email. If this commit was made by you, check your local git email setting."

所以我做了一些改变which was indicated here.

git config --global user.email "your_email@example.com"

之后我的提交将我的用户名作为作者姓名,它将作为超链接。

但问题是我以前的所有其他提交都保持不变。有什么方法可以改变它们。 ? (即将我的用户名设置为提交作者)

2 个答案:

答案 0 :(得分:1)

所以你在原始提交中使用了不同的电子邮件地址作为user.email?

如果是,那么我认为您可以通过将该电子邮件地址与您的GitHub帐户相关联来解决此问题(请参阅here了解如何执行此操作)。

答案 1 :(得分:0)

尝试设置你的名字

git config --global user.name "John Doe"