Every Git commit identifies you with an email address. You can keep your personal email address private by using
firstname.lastname@example.org for commits you make in the browser or push from the command line. You can also choose to block commits you push from the command line that expose your personal email address.
Warning: If you use your
email@example.com address to make commits and then change your username, those commits will no longer be associated with your GitHub account. For more information, see "What happens when I change my username?"
- In the upper-right corner of any page, click your profile photo, then click Settings.
In the left sidebar, click Emails.
Select Keep my email address private.
To keep your email address private in commits you push from the command line:
- Select Block command line pushes that expose my email, to block commits you push from the command line that expose your personal email address.
Set your email in Git to commit with
firstname.lastname@example.org of your personal email address.