DEV Community

Rost
Rost

Posted on Originally published at glukhov.org

Configure Git User Name and Email Address

After clonning the git repository, do the local repository configuration, particularly set user name and email address.

This page is part of Developer Tools: The Complete Guide to Modern Development Workflows.

When you doing first commit to newly clonned repo via command line like

git commit -m "test commit msg"
Enter fullscreen mode Exit fullscreen mode

you might receive a sencible message and git do what expected:

[master 3506e11] test commit msg
 Committer: megaadmin <megaadmin@myhost>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly
...
Enter fullscreen mode Exit fullscreen mode

but if you use vs code, you might get a message like

How

Basically what we need to do is to run git with configure command:

git config user.email "root@microsoft.com"
git config user.name "bg"
Enter fullscreen mode Exit fullscreen mode

Just replace email and username with yours.

Useful links

Top comments (0)