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)

  • find a branching off point for repo-less code
  • How do I restore from a previous commit on Xcode 8?
  • Is there an easy way to push the code to 50 websevers **in parallel**?
  • Jenkins Git plugin detached HEAD
  • Python subprocess.Popen to use git pager
  • Git pull fails: You have unstaged changes. Git status: nothing to commit (working directory clean)
  • File doesn′t get into the commit after using git add -N
  • git receive-pack stops with 0000
  • Does Git require a centralized server or not?
  • move my global .gitconfig file
  • Does a Git branch you merged in from become part of the Git branch you merged to?
  • Recovering added file after doing git reset --hard HEAD^
  • 3 Solutions collect form web for “How does git know my email?”

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

    You can verify it by running

    git config --global --get

    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.

    Check your email configuration by:

    git config --list

    In almost case, setup email address correctly is necessary:

    git config ""

    Email is the first criteria for user identification.

    You may not have explicitly given git your address. The git commit-tree documentation describes how git approximates your attribution when all details are not known.

    While parent object ids are provided on the command line, author and committer information is taken from the following environment variables, if set:


    (NB: <, > and \n characters are stripped.)

    In case (some of) these environment variables are not set, the information is taken from the configuration items and, or, if not present, the environment variable EMAIL, or, if that is not set, system user name and the hostname used for outgoing mail (taken from /etc/mailname and falling back to the fully qualified hostname when that file does not exist).

    Git Baby is a git and github fan, let's start git clone.