Reputation: 531
I changed my git config user.name and user.email using the command git config --global user.name name. When I run git config --global --list in terminal or in command prompt, I get my credentials. But when I push or commit, the commit/push goes from previous user. What should I do? Right now I am doing commit/pushes from github desktop.
Upvotes: 0
Views: 54
Reputation: 531
So basically, windows credentials cached git credentials. So, I went to control panel > credential manager > windows credential. There you will be seeing git:github.com or something similar. Check if it's your account. If it's not, then edit it or remove it(in my case I edited).
Upvotes: -1
Reputation: 52026
Changing user.email
in your configuration will change the email in the commits you create from now on, but does not change the author of already existing commits.
If you want to modify the author of your previous commits: you will have to rewrite them.
See for example this answer: https://stackoverflow.com/a/1320317/86072
Upvotes: 1
Reputation: 330
Git also has a config for each repository. Try going to your repo (with your command line tool) and change the config without the --global
argument.
Upvotes: 1