Configure username and email in Git
Today we will show you how to configure username and email in Git at global level and local level. It will be used when you commit your code in repository.
Configure username and email in Git, Setting your username & email in Git, configure git settings at global level and local level, set name and email for git repository, How to set GitHub user.name and user.email per Repository.
Way to configure username and email in Git
1. Configure at global level
If you don’t want to set the username and email for each repository then you should set the username and email at global level. Following command will be used to do it.
1 2 | git config --global user.name "<USER NAME>" git config --global user.email "<USER EMAIL ADDRESS>" |
2. Configure at local level
To set the repository specific configuration then you can use the following command in the project directory.
1 2 | git config user.name "<USER NAME>" git config user.email "<USER EMAIL ADDRESS>" |
3. Check the configuration list
In order to check the git configuration, you should use the below command.
To check local configuration
1 | git config --list |
To check global configuration
1 | git config --global --list |
That’s it for today.
Thank you for reading. Happy Coding!