Set your Git username and email

Set your Git username and email #

The Git protocol stores username and email information with commits you make. This is separate from your GitHub credentials.

Set your username #

The Git username is displayed beside each commit.

Although it’s possible to set any username, using your GitHub username will make troubleshooting much easier.
  1. Open the terminal with TerminalNew Terminal.
  2. Set your username by entering git config --global user.name "MaxHeadroom", substituting your own username.
  3. Confirm your username by entering git config --global user.name.
  1. Open Git Bash from your applications.
  2. Set your username by entering git config --global user.name "MaxHeadroom", substituting your own username.
  3. Confirm your username by entering git config --global user.name.

Set your email #

The Git email address is used to link commits to your GitHub account.

GitHub provides a private email address for commits if you wish to keep your personal email private.

  1. Sign into GitHub.
  2. From the user menu at the top right, select Settings.
  3. Select Emails.
  4. Scroll to Keep my email addresses private, then copy your private address. It looks something like: [email protected].
  1. Open the terminal with TerminalNew Terminal.
  2. Set your email by entering git config --global user.email "[email protected]", substituting your own email.
  3. Confirm your email by entering git config --global user.email.
  1. Open Git Bash from your applications.
  2. Set your email by entering git config --global user.email "[email protected]", substituting your own email.
  3. Confirm your email by entering git config --global user.email.

Next steps #