Git is a distributed version control system that’s widely used by most software teams today. Git allows you to set a global and per-project username and email address. In this article we are going to see how to configure git username and email address.
Set the username/email gloablly
The global git username and email address are associated with commits on all repositories on your system that don’t have repository-specific values. To configure the global username and email address, run the following commands:
Verify the results by running the following command:
1 2 3
git config --global user.name
git config --global user.email
Set the username/email per repository
You can also set the username and email address on a per-repository basis. To do this, navigate to the root directory of the repository and run the following commands:
Verify the results by running the following command:
1 2 3
git config --get user.name
git config --get user.email
Conclusion
In this tutorial, we learned how to how to configure Git username and email address. You can find the all the related commands for this tutorial from here. If you have any issue regarding this tutorial, mention your issue in the comment section or reach me through my E-mail.