我为github项目添加了很多行,为什么它说我只添加了两个?

时间:2018-05-14 10:33:41

标签: github

查看该项目的贡献者页面:

https://github.com/Sahand1993/CraigslistPrice/graphs/contributors?from=2018-04-22&to=2018-05-14&type=a

我的用户名是Sahand1993。如果你查看我的图表,它说我只添加了 2行代码。但是如果你看一下名为elasticsearch/searcher.py的项目文件,你会看到我添加了整个文件,大约200行!

那么,为什么Github说我只添加了2行?

1 个答案:

答案 0 :(得分:2)

GitHub与用户via the email address in the commit的提交相匹配。您尚未正确设置电子邮件地址。

我看到来自sahandzarrinkoub@n157-p198.eduroam.kth.sesahandzarrinkoub@Sahands-MBP.lan的多次提交,但只有一次来自sahandz@hotmail.com。最后一封电子邮件地址是the one you've registered with GitHub

如果其他电子邮件地址是您拥有的真实电子邮件地址,则可以add them to your GitHub account并声明这些提交。但我认为它们不是(当然@Sahands-MBP.lan看起来不正确)。

我建议

  1. 将您计划使用的所有电子邮件地址添加到GitHub个人资料中。

  2. 在这两台计算机上正确设置您的电子邮件地址,例如通过

    git config --global user.email "sahandz@hotmail.com"
    

    这将使GitHub能够将新提交与您的帐户相关联。

  3. Adding a .mailmap file to map the wrong email addresses to the correct email address