DEV Community

loading...
Cover image for Configure user name & email for Git profile using terminal

Configure user name & email for Git profile using terminal

Vishnu Damwala
A human being currently living in India🇮🇳 on Earth. Founder of MeshWorld, a web geek, an industry experienced web developer & tutor/instructor currently lives in Surat City.
Originally published at meshworld.in ・1 min read

Git allows you to configure a global and per-project Git profile consisting of name and email address.

Git commands come handy when you want to set or change your git identity. Changes only affect future commits.

Set or update user name for local Git profile using terminal

The first thing you should do when you install Git is to set your name and email address.

This is important because every Git commit uses this information. By default this information will be used if none other specified.

And it's immutably baked into the commits you create.


Commands to configure Git user profile

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

The --global option will set your global commit name & email address.

Once done, verify that the information is configured by executing below command in terminal:

git config --list
Enter fullscreen mode Exit fullscreen mode

Example
git config --global user.name "Jane Doe"
Enter fullscreen mode Exit fullscreen mode
git config --global user.email "jane.doe@example.com"
Enter fullscreen mode Exit fullscreen mode

Read others post on our site MeshWorld

Happy 😄 coding

With ❤️ from 🇮🇳

Discussion (0)