Miscellaneouss

How To Set Or Change Username and E-mail In GIT?

Set-Or-Change-Username-and-mail-In-GIT
mm
Written by Santosh Prasad

If you are using GIT, I will suggest you to set username and e-mail so that you don’t need to set them every-time when you use GIT to do changes. In this article I will show you how you can set username and e-mail for editing data with in GIT.

Check Username And Email Set for GIT Login

To know the username and email you can use git command or open ~/.gitconfig file.

Using Git Command

# git config user.name

Santosh Prasad

# git config user.email

[email protected]

Using ~/.gitconfig file

# grep -E 'name|email' ~/.gitconfig

Set Username And Email For Login

Syntax:

git config --global user.name "your user name"

git config --global user.email "Your e-mail"

Follow the below command to set username and email for login.

# git config --global user.name "Santosh Prasad"

# git config --global user.email "[email protected]"

Now make sure these setting are saved or not, just open ~/.gitconfig and see the changes.

Thanks:)

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment