I was pushing and pulling from git in Terminal then I changed my username on github.com. I went to push some changes and it couldn't push because it was still recognizing my old username.. How do I change/update my username on git in terminal?
Git – How to change the Git username in terminal
gitgit-configgithub
Related Topic
- Git – How to undo ‘git add’ before commit
- Git – How to undo the most recent local commits in Git
- Git: How to force “git pull” to overwrite local files
- Git – How to create a remote Git branch
- Git – How to delete a Git branch locally and remotely
- Git – How to push a new local branch to a remote Git repository and track it too
- Git – How to rename a local Git branch
- Git – How to update or sync a forked repository on GitHub
Best Answer
git config --list
to check current username & email in your local repo.git config [--global] --replace-all user.name "Full Name"
git config [--global] --replace-all user.email "email@address.com"
Per repo basis you could also edit
.gitconfig
manually instead.When performing step 2 if you see
credential.helper=manager
you need to open the credential manager of your computer (Win or Mac) and update the credentials thereHere is how it look on windows![enter image description here](https://i.stack.imgur.com/X7VEi.png)
Troubleshooting? Learn more