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
The "Contributions Calendar" or "Activity overview" on github is only recording the commits that are related to the mail address that is recorded in the github account.
As already noted by many others in this thread, look up the current locally saved email address by:
git config user.email
If it doesn't match the mail on github, change using:
git config --global user.email my_email@gmail.com
This will globally change the mail address for all future commits but will not affect the "Contributions Overview" for the past ones. You can follow the official docs for an extended description.
You realize that many of your past commits have not been recorded correctly in the Github "Contributions Overview":
To change that, you can change the author info for the repositories by following the steps explained in the official github docs.
A short summary:
Clone a bare repository
git clone --bare https://github.com/user/repo.git
cd repo.git
Paste the following code into the git bash console after changing the variables OLD_EMAIL
, CORRECT_NAME
and CORRECT_EMAIL
:
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags
Press enter to run the script
git push --force --tags origin 'refs/heads/*'
This procedure should update the "Contributions Overview" and now also show the commits not shown before:
Warning: This action is destructive to your repository's history. If you're collaborating on a repository with others, it's considered bad practice to rewrite published history. You should only do this in an emergency.