1

I've changed my username in GitHub. I've made few commits to my Git and entered the command >git log to see my commits. In the Author section, it is still showing my previous username. How do I change/update my current username on Git? Also it should reflect in Author section after making commit.

> git log
commit commitId (HEAD -> master)
Author: **My previous username** <My email id>
Date:   Sun Feb 14 16:39:26 2021 +0530
  • Github username has nothing to do with git author configuration. Change git configuration so that it is used when commits are created by git: https://docs.github.com/en/github/using-git/setting-your-username-in-git – Philippe Feb 15 '21 at 07:49

1 Answers1

4
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

See git first time setup

andy meissner
  • 1,202
  • 5
  • 15