0

When I commit with git, I cannot get rid of the warning :

 Committer: Dominic Mayers <dominic@tmorg.ca>
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 you@example.com

If I change my email to dominic@tmorg.ca, it does not help. Perhaps the answer is as simple as the one provided there Name and email set in Git's per-user configuration file, however Git is still using the default generated name and email. It must be that I also made a stupid mistake, but I cannot see it. Here is the output of $ git config --global --list

user.mail=admin@tmorg.ca
user.name=Dominic Mayers

Note addded: The stupid mistake is that I used mail instead of email .

The content of .git/config

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "donation"]
        url = dominic@192.155.90.64:/var/www/donation.git
        fetch = +refs/heads/*:refs/remotes/donation/*
[user]
        mail = admin@tmorg.ca
        name = Dominic Mayers

The output of ls -la .git

drwxrwxr-x  2 dominic git                  4096 Dec 17 15:04 branches
-rw-rw-r--  1 dominic dominic               279 Dec 17 18:07 COMMIT_EDITMSG
-rw-rw-r--  1 dominic dominic               263 Dec 17 17:41 config
-rw-rw-r--  1 dominic git                    73 Dec 17 15:19 description
-rw-r--r--  1 dominic git                    93 Dec 17 15:36 FETCH_HEAD
-rw-rw-r--  1 dominic git                    23 Dec 17 15:19 HEAD
drwxrwxr-x  2 dominic git                  4096 Dec 17 15:04 hooks
-rw-rw-r--  1 dominic dominic             16080 Dec 17 17:43 index
drwxrwxr-x  2 dominic git                  4096 Dec 17 15:04 info
drwxr-xr-x  3 dominic git                  4096 Dec 17 15:19 logs
drwxrwxr-x 28 dominic git                  4096 Dec 17 18:07 objects
-rw-rw-r--  1 dominic dominic                41 Dec 17 15:36 ORIG_HEAD
drwxrwxr-x  5 dominic git                  4096 Dec 17 15:19 refs

What else should I look at?

Community
  • 1
  • 1

1 Answers1

0

Try to check the config values for local/system/global

git config --global --get user.name
git config --system --get user.name
git config --local --get user.name

as mipadi has mentioned you seem to overwrite with your local config the global config. Remove it with:

git config --local --unset user.name

And check the user.name is now correct:

git config --get user.name

Do the same with user.email

  • 1
    Thank you so much. I knew it was a stupid mistake. I defined "mail" instead of "email". There is no problem in overwritting a global configuration with a local one. The whole purpose of a local config file is exactly to overwrite a global one. The mistake is simply that I did not define the email, but mail. When I did it again, using user.email, as you suggested, it worked. –  Dec 18 '15 at 00:03