EN
Git - how to set username and email?
2
points
1. Overview
Usually we configure global username and email address after installing Git.
We can also set configuration for single specific repository.
In this post we cover both configurations:
- global (all repositories)
- single repository
Git configuration works the same under Windows, Linux and macOS.
2. Git - set global username and email configuration
- Open command line (eg git bash)
- Set your username:
git config --global user.name "FIRST_NAME LAST_NAME"
- Set your email address:
git config --global user.email "OUR_NAME@example.com"
- Verify your configuration by showing username and email
# show username git config user.name # show email git config user.email
3. Git - set username and email configuration for single repository
- Open command line (eg git bash) and change directory into specific repository
- Set your username:
git config user.name "FIRST_NAME LAST_NAME"
- Set your email address:
git config user.email "OUR_NAME@example.com"
- Verify your configuration by showing username and email
# show username git config user.name # show email git config user.email