druid

Github注册有些年头了,自微软收购GitHub 后,官方宣布了一项重大更新,免费开放私有代码库。才逐渐用的多了起来,一直都是作为个人的代码仓库,来管理整合自己的代码。但也一直有个小问题困扰,就是在提交代码后有部分并不会统计贡献值,一直也没有深入去研究这个问题,以为是因为私有库不会被统计,最近看到了关于贡献值统计的规则,才发现

原因是: commit的邮箱需要跟github的邮箱一致,才会进行统计。

部分官方文档说明:

Commits must be made with an email address that has been added to your GitHub account, or the GitHub-provided noreply email address provided to you in your email settings, in order to appear on your contributions graph. For more information about noreply email addresses, see “Setting your commit email address.”

感觉错过了好多绿格子 = _ = …..

1.首先确定github的邮箱地址。

登录github,右上角头像,setttings,emails 查看github的邮箱,这个可能会有多个。

2.确认git的邮箱

git config user.email

如果该邮箱不在github绑定的list内,更将git email换为github绑定的任意一个就可以了。

修改git email命令:

git config --global user.email "me@eric7.site"

然后再次提交代码,贡献值就会出现在Contributions Calendar。

Nice!

druid

See you next time!