Git config file tips

These commands work on /.git/config file
git config --system--unset credential.helper
git config --global--unset credential.helper
git config --global credential.helper wincred
git config --global credential.helper osxkeychain

To update your credentials, go to Control Panel → Credential Manager → Generic Credentials. Find the credentials related to your Git account and edit them to use the updated password.

Reference: How to update your Git credentials on Windows

Note that to use the Windows Credential Manager for Git you need to configure the credential helper like so:

git config --global credential.helper wincred

If you have multiple GitHub accounts that you use for different repositories, then you should configure credentials to use the full repository path (rather than just the domain, which is the default):

git config --global credential.useHttpPath true

The only thing that worked for me was navigating to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and removing the passwd file.

Once this file is removed, restart SourceTree and execute a fetch or something else that requires access to the repo in question. SourceTree will then prompt you for your password, rewriting the cached credentials.

I hope this helps. Shoutout to my buddy Nick for the assist.

If you’re a macOS user, Auke states below that “you can find the password files per repo it in ~/Library/Application Support/SourceTree”