Blog

Setting your email in Git

Setting your email address for every repository on your computer

  1. Open Terminal (for Mac and Linux users) or the command line (for Windows users).
  2. Set your email address with the following command:
    git config --global user.email "[email protected]"
    
  3. Confirm that you have set your email address correctly with the following command.
    git config --global user.email
    # [email protected]
    

Setting your email address for a single repository

You may need to set a different email address for a single repository, such as a work email address for a work-related project.

  1. Open Terminal (for Mac and Linux users) or the command line (for Windows users).
  2. Change the current working directory to the local repository in which you want to set your Git config email.
  3. Set your email address with the following command:
    git config user.email "[email protected]"
    
  4. Confirm that you have set your email address correctly with the following command.
    git config user.email
    # [email protected]