Blocking command line pushes that expose your personal email address

If you've chosen to keep your email address private when performing web-based operations, you can also choose to block command line pushes that may expose your personal email address.

When you push commits from the command line, the email address that you've set in Git is associated with your commits. This setting blocks you from pushing commits on the command line that use your personal email address.

For more information on commit email addresses, including your GitHub-provided noreply email address, see "Setting your commit email address."

  1. In the upper-right corner of any page, click your profile photo, then click Settings.
    Settings icon in the user bar
  2. In the left sidebar, click Emails.
    Emails tab
  3. To keep your email address private when performing web-based Git operations, click Keep my email address private.
    Image of checkbox to keep your email address private
  4. To keep your email address private in commits you push from the command line, select Block command line pushes that expose my email.
    Option to block command line pushes that expose your emails

Further reading

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.