git commit asking for who you are

Viewed 2795

I ran into below error message while trying to make some commits.

*** Please tell me who you are.

    Run

      git config --global user.email "you@example.com"
      git config --global user.name "Your Name"

The issue could be solved by typing instructed command as shown. I just wonder why did such message occur? I have used git for a while now, normally it would just commit and add files without any message like this.

3 Answers

This is basically done to set your accounts default identity.That is when you are commit requests on git it won't matter to you that much if you are working on that particular project alone but if you are working on some project as a team it is important to set the accounts identity so that there are no issues later. However if you are user who usually or wants to work alone you can add your username and email to ~/.gitconifig file .Once this is done you won't have to git config --global user.email "you@example.com" git config --global user.name "Your Name" every time update it. Also you can simply Omit --global to set the identity only in this repository.

Related