Git: name and email address configuration

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)