Tell me who you are bypass, git bug

When I try to commit the repository, I get an error message:

$ git commit *** Please tell me who you are. Run git config --global user.email " you@example.com " git config --global user.name "Your Name" to set your account 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 on the output, however I don't want to do this.

The computer in question does not belong to a specific person, but is a shared computer. Therefore, each latch will be a different user.

How do I get around this and set the author for each commit, not global?

+6
source share
2 answers

Another option is to use the -c flag to pass the configuration parameter to the current command.

In your case, git -c user.email=" your@email.com " -c user.name="Your Name" commit ...

The -c values ​​override any other default values ​​(set and delete options). Note that all -c options must appear before the commit command name.

+6
source

You can use the --author flag:

 $ git commit --author="AU Thor < author@example.com >" 
+2
source

All Articles