Home > database >  github contribution graph activity
github contribution graph activity

Time:11-09

Few weeks ago i changed the primary email of my github account a since than my contribution graph is empty , after that i read that this is due to mismatch of my github account email and my local git email from which i am commiting. I changed the local user.email to the correct one but still my activity doesen't show up. I tried to run a bunch of command with rebase and filter_branch but it made the situation even worse becouse it doubled my commits and i can't fix it. Is there a way to show my activity is there a setting in github which shows activity from all commit authors or a e command which can fix it. Command i tried from this link

How do I change the author and committer name/email for multiple commits?

CodePudding user response:

don't know what OS you're using, while I used windows I had the same issue of my commits not showing.

I managed to fix it by reinstalling git on my computer, setting it up again and recommitting the files.

Also, is your repository private? If it is, above your contributions on your profile (the boxes that go green when you commit something), on the right there are "Contribution settings". Make sure Private Contributions have a check on the left

CodePudding user response:

i found an answer

git filter-branch --force --commit-filter '
        if [ "$GIT_COMMITTER_EMAIL" = "wrond email here" -o "$GIT_COMMITTER_EMAIL" = "wrong email here" ];
        then
                export GIT_COMMITTER_NAME="correct name";
                export GIT_AUTHOR_NAME="correct name";
                export GIT_COMMITTER_EMAIL="correct email";
                export GIT_AUTHOR_EMAIL="correct email";
        fi;
        git commit-tree "$@"
' --tag-name-filter cat -- --all

after that run

git push --force --tags origin 'refs/heads/*'

  • Related