GitHub commits aren't recorded in the 'Your Contributions` calendar

前端 未结 27 1081
南笙
南笙 2021-01-29 21:59

I\'ve been making continuous commits to my GitHub repos from my linux shell and they show up nicely on the website just as they should. The only problem is that \"Y

相关标签:
27条回答
  • 2021-01-29 22:16

    for me was the file within the project:

    /.git/config
    
    ...
    [user]
        name = your user
        email = user@host.com
    ...
    

    Inside the block [user] double-check the 'email' is correct (mine was incorrect) and the name is unique (mine was duplicated).

    To double-check with contributor is increasing use:

    git shortlog -sn
    

    make a push, check which one is increasing the counter and that name should be the name inside the block [user]

    0 讨论(0)
  • For me this problem was caused by me committing from my work computer where I was using a different email in my gitconfig. Adding my work email address to my github account didn't make the past commits show up in the summary, but new commits are now showing up as they should.

    You can find the email address you are using for a repository with git config user.email.

    0 讨论(0)
  • 2021-01-29 22:17

    I hade to manually add my email to SourceTree settings even if git config had the right email address configured. Only after doing this, GitHub started recording my commits to my contribution graph.

    SourceTree Settings Screenshot

    0 讨论(0)
  • 2021-01-29 22:20

    Make sure your local email is the exact same that the one in the account.

    Go to the terminal and inside the folder you are pushing the commits, run:

    git config --global user.email
      #=> TRICULI.TO@MAIL.com
    
    git config --system user.email
      #=> 
    
    git config --local user.email
      #=> triculito@mail.com
    

    Something similar was happening to me. The email in my account was the one in the --global, but my --local was slightly different, it had not '.'.

    (In Gmail there is no difference between those emails, they work the exact same).

    0 讨论(0)
  • 2021-01-29 22:21

    I've just added my email again through the command line and it solves the issue:

    $ git config user.email "myemil@mydomain.com"
    

    And another issue is about your branch. If you create another branch beside maser and try to push that branch this issue might occur. In my case I have started pushing to master and got the solution.

    0 讨论(0)
  • 2021-01-29 22:22

    so this usually happens due to a lot of factors, for which you must visit this GitHub help

    The most common mistakes I found were :

    1. Email not configured properly on local machine. (your laptop/pc).
    2. Forking.
    3. Not using default or gh-pages branch for commit.

    I personally had issue 1 recently, for which I went to my terminal/cmd/cli and configure my email address locally by running this command

    git config --global user.email yourname@email.address
    

    Once that's done, try running this config again like this:

    git config --global user.email
    

    You should be able to see:

    yourname@email.address
    

    If this was correct, you have successfully configured your local machine with your global public repo. Now your next commit will be credited towards your calendar.

    0 讨论(0)
提交回复
热议问题