I\'m working with several repositories, but lately I was just working in our internal one and all was great.
Today I had to commit and push code into other one, but
I faced the same issue as the OP. It was taking my old Git credentials stored somewhere on the system and I wanted to use Git with my new credentials, so I ran the command
$ git config --system --list
It showed
credential.helper=manager
Whenever I performed git push
it was taking my old username which I set long back, and I wanted to use new a GitHub account to push changes. I later found that my old GitHub account credentials was stored under
Control Panel → User Accounts → Credential Manager → Manage Windows Credentials.
I just removed these credentials and when I performed git push
it asked me for my GitHub credentials, and it worked like a charm.