Git Email

Fatal: no email was given and auto-detection is disabled

Premise

Received the following error during code commit.

fatal: no email was given and auto-detection is disabled

Solution

This error is due to the fact that there’s no local user setting found. We need to update this setting which will be used to create logs, on code commit.

  • Launch Git Bash.
  • Run the following cmd
git config --global user.name "your_name"
git config --global user.email "your_email_id"
git user.email

The above code sets the name and email id which will be used during code commit.

I’ve used the global tag to set this setting globally. Remove the global tag to apply this setting to the local repository only.

4 thoughts on “Fatal: no email was given and auto-detection is disabled

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.