Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bypass "Tell me who you are" error in git

Upon attempting to commit a repository, I get the error:

$ git commit

*** 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.

fatal: unable to auto-detect email address (got '[output redacted]')

The obvious solution would be to run the git config options in the output, however I do not want to do that.

The computer in question doesn't belong to a specific person but is a shared computer. Therefore, each commit would be a different user.

How do I bypass this and set author to be per commit and not a global?

like image 441
Brandon Nguyen Avatar asked Sep 20 '15 05:09

Brandon Nguyen


1 Answers

Another option is to use the -c flag to pass config paramter to the current command.

In your case git -c user.email="[email protected]" -c user.name="Your Name" commit ...

The -c values override any other default values (set and unset parameters). Note that all the -c options need to come before the command name commit.

like image 155
CodeWizard Avatar answered Oct 15 '22 20:10

CodeWizard