How to remove cached credentials from Git?

Max Li picture Max Li · May 29, 2017 · Viewed 71.1k times · Source

I ran:

$ git config credential.helper store

And then:

$ git push origin master

After pushing, I entered my credentials and they were saved.
I read that they are stored in plaintext, and so now I want to remove my credentials from being saved and entered by default.

How can I do this?

Answer

Coder picture Coder · Oct 16, 2017

Run the following command in the terminal to remove your credentials stored in the cache

git config --global --unset credential.helper