GitHub 更新代码到底怎样才算贡献?

2015-01-17 20:58:15 +08:00
 CtrlSpace
我经常每隔几天就把我更改的程序更新到GitHub上面,但是都没有贡献。
对着https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/ 看了很多次了,条件没有不符合啊。
到底怎样才算贡献呢,感觉我天天撸代码,GitHub上还是一片空白,没几个绿色的,倒是随意更改下README.ME就有贡献了。。。
7279 次点击
所在节点    程序员
9 条回复
ZackYang
2015-01-17 21:03:50 +08:00
git config global.user
git config global.email

这2个要和github上面的一致, 特别是email, 否则不会计入contributions
scarlex
2015-01-17 21:09:02 +08:00
1楼说的对,email 的设置非常重要。
设置之后用 https://help.github.com/articles/changing-author-info 这招去修改下自己以前的提交,然后强推一遍就能看到有绿色的格子了。
CtrlSpace
2015-01-17 21:09:12 +08:00
@ZackYang 观察了一下,在Personal Settings里,Profile里有个email,然后下面还有个Emails也有个email,这大概就是问题所在0.0
我是写成Profile里面的email了。。。
Keinez
2015-01-17 21:16:19 +08:00
Your primary GitHub email address will be used for account-related notifications (e.g. account changes and billing receipts) as well as any web-based GitHub operations (e.g. edits and merges).
sammo
2015-01-18 00:54:54 +08:00
查看
git config --global -l
设置
git config --global user.email "thesame-email-as-github-account@mail.com"
git config --global user.name "your-username"
9hills
2015-01-18 00:57:21 +08:00
@CtrlSpace 以Emails里的邮箱地址为准,但是Emails里能添加很多很多个,所以你没必要去修改历史信息。只需要把你所有的邮箱都塞到Emails里就行
Adward
2015-01-18 00:57:23 +08:00
补充一条,push的branch要和默认branch一致,否则要merge以后才出来(似乎有可能不出来,但是merge本身是算作contribute的)。
liubiantao
2015-01-18 06:34:21 +08:00
再补充两条,修改到 gh-pages 也算贡献,如果是 fork 的分支,必须 pull request 到父分支才算。
https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/
allencpp
2015-01-18 14:43:08 +08:00
更新自己的,还是fork别人的?update别人的代码不算贡献,一定要pull request或者提issue,更新自己的代码先对自己的代码做star

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/163059

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX