Search code examples
gitgithubgit-commit

Git actions and GitHub actions counted as different users


For some reason, whenever I make a commit via my git terminal, it is counted as my real name. Whenever I make a commit via the GitHub user interface, it is counted as my GitHub profile. Does anyone know why this happens?


Solution

  • The user your terminal commits as you configure yourself with:

    git config --global user.name "Your Name"
    git config --global user.email "[email protected]"
    

    Then when you push your commits GitHub checks the email address against the list of email addresses you have on your account, and if they match GitHub displays the commit as coming from your account.

    To see which email address made a commit on your local machine, simply do

    git log