Git simply detects you don’t have the following section in your config files:
[user]
name = <your name>
email = <your mail>
<project_path>/.git/configfor the project specific config file.~/.gitconfigthe global config file
When you do:
git config --global user.name "Your Name"
git config --global user.email you@example.com
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 <foo@bar.com>
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