my commits not being tracked when i push code to git hub from my terminal #140825
Replies: 4 comments 1 reply
-
Hi @tsangrebecca , Usually, when contributions aren't shown in the activity graph it's for the following reasons:
Given that you are experiencing the problem only when pushing your code from the terminal, it might be related to your For more info, check the docs: |
Beta Was this translation helpful? Give feedback.
-
Here are some possible causes and solutions: 1. Email Mismatch:The most common issue is that the email address associated with your terminal commits doesn’t match the one linked to your GitHub account. To check your email settings in Git, run: git config --global user.email Ensure that the email shown matches the one registered on your GitHub account. If it doesn't, update it with: git config --global user.email "[email protected]" 2. Commits Not in the Default Branch:Commits will only show up on your contribution graph if they are made on the repository’s default branch (usually 3. Private Repository Settings:If you are working on a private repository, you need to enable the "Include private contributions" option for them to appear on your contribution graph. Go to Settings > Profile and check this option【12†source】. 4. Commit Author Information:If you push code using the terminal but your commits are attributed to another author (e.g., an old email), GitHub will not associate those commits with your profile. Check the author info in your past commits by running: git log --format='%ae' If the wrong email is displayed, you can reset the commit author by running: git commit --amend --reset-author 5. Delayed Graph Updates:Sometimes GitHub takes time (up to 24 hours) to update the contribution graph. If you’ve made recent changes, wait a bit before checking again【12†source】. 6. Direct GitHub Website Edits:When you edit files directly on GitHub’s website, it automatically uses the correct email address and attribution, which is why those edits reflect immediately on the contribution graph. Further Reading: |
Beta Was this translation helpful? Give feedback.
-
This is a common issue, and mostly it's the email Address: Make sure the email address associated with your commits matches one of the verified email addresses on your GitHub account. You can check your commit email with:
If it doesn’t match, you can update your global Git config with:
Default Branch: Confirm that you’re pushing to the default branch (usually main or master). Only commits on the default branch or those merged into it count towards your contribution graph. Commit Author Info: Make sure your commits are attributed to your user. Check your recent commits to see the author info with:
I'd also check Repository Visibility: If you're working in a private repository, contributions might not show up unless you're the owner or if it's part of an organization. Force Push (if needed): If you’ve amended or reset your commits, you might need to force push:
Also wait for Updates: Sometimes, it can take a little while for GitHub to register new commits in the graph, so give it some time after pushing. If you check all these points and it's still not working, consider reaching out to GitHub support for assistance. Good luck! |
Beta Was this translation helpful? Give feedback.
-
I’ve dealt with that kind of problem before and was able to fix it perfectly. To make the green square appear on the profile calendar, there are two basic steps. I know this method is a bit classic and straightforward, but it’s reliable. I hope my suggestion works well for you. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
My commits not being tracked when I push code to git hub from my terminal, so I don't see a green square in the profile calendar :( However, when I edit something directly on the github website, then a green square will appear.
Beta Was this translation helpful? Give feedback.
All reactions