How To Show and Change your Git Details

Your Git configuration is stored in the ~/.gitconfig file by default.

You can manually open this file and view and edit the details.

Or you can do it via the CLI, which I will show you in this guide.

Get your Git configuration

Simply run the following command and see all of the configurations, including your username and email.

git config --list --global
> Maher
> ... all of your other config will be here too

The --global config fetches the global settings. You can drop this flag if you have your settings set up on a per-project level.

Or, to get the individual configuration items that you need, you can use the following. 👇

Get your email:

git config        

Get your name:

git config        
> Niall Maher

How to change your Git email address

You can update your email like this:

git config --global ""

And your name:

git config --global "Fake Name"
> Fake Name

Now you can easily see and update your Git configuration! ✌️

Avatar for Niall Maher

Written by Niall Maher

Founder of Codú - The web developer community! I've worked in nearly every corner of technology businesses; Lead Developer, Software Architect, Product Manager, CTO and now happily a Founder.


Fetching comments

Hey! 👋

Got something to say?

or to leave a comment.