Could I use the ID-based GitHub-provided noreply address in git?

Viewed 1226

Would my contributions be counted if I use the ID-based GitHub-provided noreply address in git as the email and push changes ?

My ID-based GitHub-provided noreply address looks like this ID+username@users.noreply.github.com

2 Answers

Short answer? Yes, your contributions will be counted.

Longer answer? Yes, they will be counted, but doing it this way may have ramifications for you in the future. For context, GitHub assigns contributions to accounts by the email address used to git commit. Therefore, if you change your GitHub username in the future, your GitHub-assigned email would change, and GitHub won't assign commits from your old GitHub email to your account anymore. (I know from personal experience.) If you're interested in keeping your email private but still having your changes counted, I might recommend attributing your commits to some email that you only use for git, but that you know won't change over time if you ever decide to change your username.

Edit: Under the old GitHub system with username@users.noreply.github.com emails, the commits would no longer be attributed after you changed your username. Because you have one of the new ID+username@users.noreply.github.com email addresses, you'll be fine even after changing username. GoodDeeds' answer notes this correctly.

See this documentation page for more information about GitHub private email addresses and how to set them up. Also, if you're interested, here is a GitHub blog post about securing your account further by rejecting pushes that contain a public email.

Your contributions will be counted by GitHub as usual. Ever since ID-based noreply addresses were introduced, your contributions continue to be counted even if you change your username in the future (unless GitHub changes its policy in the future). The relevant documentation can be found here, and further explanation is given here.

Related