Stefi Rosca

🧰 Setting up your username and email in Git at your first dev job

Before and after example with image and name from profile

One of the things I had to do when getting my first job was configuring Git. Unless you setup your name and email address Git will take it from the environment. This is important because every Git commit uses this information and if it’s not setup correctly it will not be linked to your Github account. Hence if you have a profile picture it won’t show.

There are 2 ways to do it:

1. Globally

Open the command line and run the following commands with your name and email.

To setup your username:

$ git config --global "Stefi Rosca"

To setup your email:

$ git config --global ""

In this case you only have to do it once and Git will always use this information for anything you do on that system.

2. Repository-specific

From the command line, change into a repository directory where you want to make this change and then run the commands as below.

To setup your username:

git config "Stefi Rosca"

To setup your email address:

git config ""

To test that you set it up correctly you can run in your in a specific Git terminal git config

Make sure you change the name and email in the example above to yours.

For more information check out chapter on Getting Started from the Pro Git book

Read More:

👩‍💻 Frontend Developer, 🌍 traveler and⛷️ Skier

Recurse Center Alumn

Stefi Rosca © 2024