0

I was logged in with my work GitHub ID earlier this morning and then I wanted to change back to my personal GitHub account in GIT(Windows). So I removed my work GitHub ID credentials from Windows Credential Manager and then when I tried git push for a new repository it asked to log in and I logged in using my personal GitHub Account. but its still showing my git config user.name as 'my work Account Name' and when I try to see the credentials in Windows Credential Manager it says PERSONAL ACCESS TOKEN

PS - Please tell if theres any way to uninstalling Git completely from windows and then reinstalling to log in with my Personal ID. Because now when I try to uninstall and then reinstall it still showing me previous username

Manish
  • 417
  • 5
  • 10

1 Answers1

2

All you need to do is configure your SSH setup with multiple SSH keypairs.

If you're working with multiple repositories using different accounts, you need to make sure that your individual repositories have the user settings overridden accordingly:

Setting username, email and GitHub token – Overriding settings for individual repos.

git config --global user.name "Your Name"
git config --global user.email "your_email@your_domain.com"

Look at this similar question

And this tutorial explain your problem really well.

To remove git on your computer delete the .git folder in the respective directory.

SwissCodeMen
  • 4,222
  • 8
  • 24
  • 34