dev@local: ~/project — git
dev@local~/project$git commit -m 'Initial commit'
fatal: unable to auto detect email address
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
Diagnostics Translation
Git refused to create a commit because you haven't configured your name and email.
waiting for resolution...
LowVersion Control System

Reviewed for reference consistency: April 11, 2026

Code is Safe

SECURE

Git has paused the operation to protect your code. No data has been lost or corrupted.

What To Know

This message means Git will not stamp new history without a clear author identity, so the commit is blocked at the metadata layer.

Where Did It Fail?

Working Tree
Your local files
add
Staging Index
Prepared changes
commit
Local Repo
Commit history
push/fetch
Remote Server
GitHub/GitLab
Git halted to protect the uncommitted files in your active working directory.

Commands That Trigger This

$git commit -m 'Initial commit'
Running on a brand new laptop
$Committing from an automated Docker pipeline without setting config globals
Committing from an automated Docker pipeline without setting config globals

Technical Background

01

Git requires a stable author identity before writing a new commit object into history.

02

That identity can exist at a machine-wide level or only inside the current repository, but Git needs one of those scopes populated before the commit is allowed.

Underlying Causes

Installing Git on a new computer and immediately trying to commit
Running Git inside a fresh Docker container without passing config variables
The global `.gitconfig` file was deleted or corrupted

Frequently Asked Questions

Git is refusing to invent author identity metadata for a new commit. It wants a deliberate name-and-email identity before the history record is created.

Related Git States