I ran:
$ git config credential.helper store
And then:
$ git push origin master
After pushing, I entered my creden
As he did not give any flag as global or local or system, it would take local by default, so the correct way is to move to the respective folder(repository) and type this command
git config --local --unset credential.helper
or
git config --unset credential.helper
Reference: https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config