spraff spraff - 20 days ago 5
Git Question

How does git know my email?

git log
correctly shows my full name and email address in the commit log. I don't remember ever telling git who I was. Have I just forgotten or does git get this information from somewhere else? (Linux)

Answer

It's (likely) configured in the global git config.

You can verify it by running

git config --global --get user.email

Or more in general, you can list the entire global configuration with

git config --global -l

You probably configured it a long time about and forgot about it since then.

Comments