How to configure username and email in git?

By | January 28, 2022

There are 2 way to configure username and email in git.

  1. Globally
  2. Local (Repository basis)

Set Username and email globally.

$ git config --global user.name "PHP Spider"
$ git config --global user.email phpspiderblog@example.com

Set username and email locally.

Switch to the repository for which you want to configure.

$ git config user.name "PHP Spider"
$ git config user.email phpspiderblog@example.com

One thought on “How to configure username and email in git?

  1. Hairstyles

    You made some decent points there. I looked on the internet for the subject matter and found most people will approve with your website.

Leave a Reply