V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
CtrlSpace
V2EX  ›  程序员

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

  •  
  •   CtrlSpace · 2015-01-17 20:58:15 +08:00 · 7268 次点击
    这是一个创建于 3398 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我经常每隔几天就把我更改的程序更新到GitHub上面,但是都没有贡献。
    对着https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/ 看了很多次了,条件没有不符合啊。
    到底怎样才算贡献呢,感觉我天天撸代码,GitHub上还是一片空白,没几个绿色的,倒是随意更改下README.ME就有贡献了。。。
    9 条回复    2015-01-18 14:43:08 +08:00
    ZackYang
        1
    ZackYang  
       2015-01-17 21:03:50 +08:00   ❤️ 2
    git config global.user
    git config global.email

    这2个要和github上面的一致, 特别是email, 否则不会计入contributions
    scarlex
        2
    scarlex  
       2015-01-17 21:09:02 +08:00   ❤️ 2
    1楼说的对,email 的设置非常重要。
    设置之后用 https://help.github.com/articles/changing-author-info 这招去修改下自己以前的提交,然后强推一遍就能看到有绿色的格子了。
    CtrlSpace
        3
    CtrlSpace  
    OP
       2015-01-17 21:09:12 +08:00
    @ZackYang 观察了一下,在Personal Settings里,Profile里有个email,然后下面还有个Emails也有个email,这大概就是问题所在0.0
    我是写成Profile里面的email了。。。
    Keinez
        4
    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
        5
    sammo  
       2015-01-18 00:54:54 +08:00
    查看
    git config --global -l
    设置
    git config --global user.email "[email protected]"
    git config --global user.name "your-username"
    9hills
        6
    9hills  
       2015-01-18 00:57:21 +08:00
    @CtrlSpace 以Emails里的邮箱地址为准,但是Emails里能添加很多很多个,所以你没必要去修改历史信息。只需要把你所有的邮箱都塞到Emails里就行
    Adward
        7
    Adward  
       2015-01-18 00:57:23 +08:00
    补充一条,push的branch要和默认branch一致,否则要merge以后才出来(似乎有可能不出来,但是merge本身是算作contribute的)。
    liubiantao
        8
    liubiantao  
       2015-01-18 06:34:21 +08:00   ❤️ 2
    再补充两条,修改到 gh-pages 也算贡献,如果是 fork 的分支,必须 pull request 到父分支才算。
    https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/
    allencpp
        9
    allencpp  
       2015-01-18 14:43:08 +08:00
    更新自己的,还是fork别人的?update别人的代码不算贡献,一定要pull request或者提issue,更新自己的代码先对自己的代码做star
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3396 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:30 · PVG 20:30 · LAX 05:30 · JFK 08:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.