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

啊摔,原来提交到 dev 分支上的 commit 在 github 里面不算 contributions

  •  
  •   bwangel ·
    bwangelme · 2016-04-16 12:05:09 +08:00 · 2792 次点击
    这是一个创建于 2933 天前的主题,其中的信息可能已经有所发展或是发生改变。

    这两天我的 github 的 contributions 突然变白了,我正纳闷呢,这两天提交代码了啊,后来一看 github help ,原来提交到 master 分支上的 commit 才算 contributions ,有种被伤害了的感觉!

    Commits
    
    Commits will appear on your contributions graph if they meet all of the following conditions:
    
        The commits were made within the past year.
        The email address used for the commits is associated with your GitHub account.
        The commits were made in a standalone repository, not a fork.
        The commits were made:
            # 就是这里说的,必须要提交到默认分支上,或者 github page 分支上
            In the repository's default branch (usually master)
            In the gh-pages branch (for repositories with Project Pages sites)
    
    In addition, at least one of the following must be true:
    
        You are a collaborator on the repository or are a member of the organization that owns the repository.
        You have forked the repository.
        You have opened a pull request or issue in the repository.
        You have starred the repository.
    

    虽说刷这玩意不一定有啥用吧,但是看到阮一峰老师 github 的 contributions graph 满满的,心里还是怪羡慕的!

    11 条回复    2016-04-19 22:40:25 +08:00
    Ervin
        1
    Ervin  
       2016-04-16 12:31:52 +08:00   ❤️ 1
    你合并到 master 的时候,会根据提交时间算你的 contributions 的
    SharkIng
        2
    SharkIng  
       2016-04-16 12:44:48 +08:00 via iPhone
    很好奇是只有 dev 不算还是只有 master 算
    bdbai
        3
    bdbai  
       2016-04-16 12:46:40 +08:00 via Android   ❤️ 1
    @SharkIng 只有默认分支算
    sox
        4
    sox  
       2016-04-16 13:08:14 +08:00
    会合并到 master 吧。。
    Pastsong
        5
    Pastsong  
       2016-04-16 13:16:07 +08:00   ❤️ 1
    @bdbai 默认分支和 gh-page 分支都算
    bwangel
        6
    bwangel  
    OP
       2016-04-16 13:32:42 +08:00
    @Ervin 喔喔,这样啊,我还不知道!
    SharkIng
        7
    SharkIng  
       2016-04-16 13:40:42 +08:00 via iPhone
    @bdbai 好的谢谢
    wsdjeg
        8
    wsdjeg  
       2016-04-19 21:44:28 +08:00
    @bwangel 要不要我教你一招?

    你可以不停修改本机电脑的日期,然后提交 commit,这样可以在每天都有一个 commit,然后 push 到 github,你的就全绿啦.
    bwangel
        9
    bwangel  
    OP
       2016-04-19 22:25:35 +08:00
    @wsdjeg ,你确定, github 没有检查吗!
    wsdjeg
        10
    wsdjeg  
       2016-04-19 22:28:54 +08:00
    @wsdjeg 他怎么检查? 我修改我的电脑日期为昨天,我提交一个 commit,那么记录的文件时间就是昨天,跟我实际上昨天提交的有什么区别,那么 我来举个例子;
    情景一:
    连续 三天, 每天 commit 一次, 第三天 push 上去
    情景二:
    第三天,连续修改两次吃见,commit 三天,同样的三个 commit 第三天 push 上去,

    请问这两种情况 有什么实际区别吗?
    bwangel
        11
    bwangel  
    OP
       2016-04-19 22:40:25 +08:00
    好像也有道理,一会去试试!

    我纯粹就是去玩玩,可不想恶意刷啊!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2984 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 14:13 · PVG 22:13 · LAX 07:13 · JFK 10:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.