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.

One thought on “Fatal: no email was given and auto-detection is disabled

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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