How to change my Git username in terminal

To Nha Notes | July 25, 2022, 4:05 p.m.

How to change my Git username in terminal

  1. In your terminal, navigate to the repo you want to make the changes in.
  2. Execute git config --list to check current username & email in your local repo.
  3. Change username & email as desired. Make it a global change or specific to the local repo:
    git config [--global] user.name "Full Name"
    git config [--global] user.email "email@address.com"

    Per repo basis you could also edit .git/config manually instead.
  4. Done!
References

https://stackoverflow.com/questions/22844806/how-to-change-my-git-username-in-terminal