Christian Screen
Christian Screen

How to show or change your Git username or email address from terminal


As a basic refresher for most working on multiple coding projects or git-scm hosted accounts changing from one git account to another begs the question:

How do I see or change my Git (or github) username (usually email address)?

How to show your Git username – the basics

Use one of these methods:

  1. git config -get [ |]
  2. git config –list
  3. or, open your git config file directly

Let’s examine each of these show your git username basics:

#1 – Use the command, git config -get [ |]

git config

This returns

Christian Screen

And if you enter git config from the terminal from anywhere with your git initiated directory such as

git config

this will return

#2 – Use the command, ‘git config –list’

This approach shows all of the key configurations from your git config file, so entering the command from the terminal:

git config --list

will return the following:

credential.helper=osxkeychain Screen


#3 – Use the ‘open your git config file directly’ approach via the terminal

If the above approaches for some reason did not work then open the file for reading/editing in your terminal window or favorite editor. Terminal window review and editing is recommended to avoid issues. Use the following command to view the global git settings:

vi ~/.gitconfig

This will open the VimEditor and your .gitconfig file should look something like this:

        name = Christian Screen
        email =

Since this is your ‘global’ git user information (using the user home director path, ~/) you could have a different settings in other projects you might be working on.

NB: I find it best that if you have a specific project you are contributing to and need to use different credentials for the contribution, you should clone the project and then within the project use the command line to change your and just for that local git repository clone project to not impact your global settings. This would look like this from the command line (notice the –global is missing):

git config "Christian Contribution Project"
git config ""

Read below if you’d like to see how to change your global Git username or email address.

How to change your Git username – the basics

Changing your Git username is fairly straightforward. In your terminal window enter the following:

git config --global "Christian The Architect"

You can then view the change directly in the ~/.gitconfig file or just use the ~/.gitconfig file to edit the key/value pair directly in the Vim Editor as you see here:

vi ~/.gitconfig

Since this is again your global Git config file, be sure edit it carefully. Remember in the Vi(m) Editor, use the ‘Esc’ key and then type ‘wq’ and then press the ‘Return’ or ‘Enter’ key to write/save the file and exit.

How to change your Git email address – the basics

You can change your email address with the same process and command as you would your username using these commands from the terminal:

git config --global ""

View any of your global changes (those made with the –global flag) using either command below:

cat ~/.gitconfig
vi ~/.gitconfig

Hopefully you’ll have success remembering these basic Git commands.

More to explorer

Bank grade security

5 Steps to Configure Key Pair Authentication in Snowflake

Key pair authentication is a secure way to access your Snowflake data warehouse without relying solely on traditional username and password authentication. In this step-by-step guide, we will walk you through the process of setting up key pair authentication in Snowflake. We’ll also cover how to install OpenSSL, a crucial tool for generating the necessary key pair.


Streamlining Your Bullhorn CRM: Mastering Duplicate Data Management

Discover the most effective strategies for eliminating duplicate records in your Bullhorn CRM. Duplicates can hinder your productivity, lead to data inaccuracies, and impact your relationships with clients and candidates. In this insightful session, we will guide you through best practices, cutting-edge tools, and proven techniques to ensure a clean and efficient CRM database.

Snowpark for Snowflake blog post

Snowpark Architecture

Dive into the fascinating world of Snowpark, a cutting-edge data platform that empowers data teams to seamlessly work with data, enabling faster analytics and insights. This meetup is designed for data enthusiasts, engineers, and professionals interested in exploring the architecture and functionalities of Snowpark by Snowflake.

Scroll to Top