Setting your email address for every repository on your computer
- Open Terminal (for Mac and Linux users) or the command line (for Windows users).
- Set your email address with the following command:
git config --global user.email "[email protected]"
- 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.
- Open Terminal (for Mac and Linux users) or the command line (for Windows users).
- Change the current working directory to the local repository in which you want to set your Git config email.
- Set your email address with the following command:
git config user.email "[email protected]"
- Confirm that you have set your email address correctly with the following command.
git config user.email # [email protected]