Replies: 5 comments 3 replies
-
I'm not 100% sure, but I think you would lose those contributions after removing his email address. You might want to read through this also: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile |
Beta Was this translation helpful? Give feedback.
-
That'd be a really bad idea because you'd be mixing addresses for different people, and yes, the contributions would be gone as soon as you remove the address (well, maybe they'd stay until some cache expires). First of, make sure you fix the If you then want to fix the past commits, you need to rewrite the repository history to change the author email in those commits. If it's just a few commits interactive rebase and
|
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
-
I made a
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="myold@email.com"
CORRECT_NAME="My Name"
CORRECT_EMAIL="mynew@email.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
In my case, there were no other branches and no other authors so it was as simple as it gets, I would be very careful about running the above if you have a multiple authors/branches or unstaged changes. I can confirm it updated my github activity to be correct. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I'm missing commits on my contribution graph.
My friend's used this pc before -- his email was stored in the git config.
The commits were done using his email address. He's not part of the current project though.
The "help" section seems to recommend I add his email to my account, then ask if he'll verify it?
If I remove his email after, will I lose the contributions though?
Beta Was this translation helpful? Give feedback.
All reactions