John Crockson
John Crockson

Reputation: 41

Will changing my GitHub username update/remove attributions using the noreply email

If I change my username on GitHub, will my contributions still show commits from merged pull requests that are listed as using the email 123456+username@users.noreply.github.com? On the GitHub website it says

Git commits that were associated with your GitHub-provided noreply email address won't be attributed to your new username and won't appear in your contributions graph. If your Git commits are associated with another email address you've added to your GitHub account, including the ID-based GitHub-provided noreply email address, they'll continue to be attributed to you and appear in your contributions graph after you've changed your username.

I'm not really sure what that means, it seems contradictory to me. The commits I am concerned with were made from pull requests via GitHub's "Squash and merge" on the website (my requests merged by somebody else as well as somebody else's requests merged by me) and show up as 123456+username@users.noreply.github.com because I have email privacy enabled in account settings. I thought maybe it meant that you have to manually add the noreply email to your email addresses on the Email settings on GitHub, but doing this gives the message Error adding 123456+username@users.noreply.github.com: email is already in use.

Upvotes: 2

Views: 1398

Answers (1)

John Crockson
John Crockson

Reputation: 41

I found the answer at https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address

Note: If you created your GitHub account after July 18, 2017, your GitHub-provided no-reply email address is a seven-digit ID number and your username in the form of ID+username@users.noreply.github.com. If you created your GitHub account prior to July 18, 2017, your GitHub-provided no-reply email address is your username in the form of username@users.noreply.github.com. You can get an ID-based GitHub-provided no-reply email address by selecting (or deselecting and reselecting) Keep my email address private in your email settings.

I think this is what I wanted - if you have the ID number at the start of the email then it is migrated with your account. This is confirmed further down the page:

If you use your GitHub-provided noreply email address to make commits and then change your username, those commits will not be associated with your GitHub account. This does not apply if you're using the ID-based GitHub-provided noreply address.

So the commits will remain as normal as long as your email has the ID at the start.

Upvotes: 2

Related Questions