Once in a while I get the message shown below from Git. My questions regarding this are:
I realize similar questions have been posted to Stack Overflow, but I don't believe they address this message in particular.
Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly:
git config --global user.name "Your Name" git config --global user.email [email protected]
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
About Git usernamesYou can change the name that is associated with your Git commits using the git config command. The new name you set will be visible in any future commits you push to GitHub from the command line. If you'd like to keep your real name private, you can use any text as your Git username.
If you want to check your configuration settings, you can use the git config --list command to list all the settings Git can find at that point: $ git config --list user.name=John Doe [email protected] color.status=auto color.branch=auto color.interactive=auto color.diff=auto ...
You can use the git config command to change the email address you associate with your Git commits. The new email address you set will be visible in any future commits you push to GitHub.com from the command line.
Git
simply detects you don't have the following section in your config files:
[user] name = <your name> email = <your mail>
<project_path>/.git/config
for the project specific config file.~/.gitconfig
the global config fileWhen you do:
git config --global user.name "Your Name" git config --global user.email [email protected]
Git writes that information into the configuration file (--global
means in the global config file).
To have a the correct Author section in a commit like the following example commit:
commit 79eeaa9f22321580a0e5bee6e237331691cd3b68 Author: Sandro Munda <[email protected]> Date: Thu Jun 8 10:40:05 2012 +0200 My first commit
You need to reset the commit information with the command:
git commit --amend --reset-author
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With