Clue Mediator

Configure username and email in Git

๐Ÿ“…December 28, 2019
๐Ÿ—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.

Checkout more articles on Git/ReactJS

Way to configure username and email in Git

  1. Configure at global level
  2. Configure at local level
  3. Check the configuration list

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.

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.

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

git config --list

To check global configuration

git config --global --list

That's it for today.

Thank you for reading. Happy Coding!