How to Update the Password in Git using Command Line
In this tutorial, we are going to learn about how to update the password in Git using the command line for github or bitbucket.
To update the password in MacOs, first open the command line and run the following command
git config --global credential.helper osxkeychain
This above command will resets the previous password and username. Now, run the git pull or push etc, it will prompt for a username and password dialog update with your new password and username.
Windows
To update the password in Windows os, first open the command line and run the following command:
git config --global credential.helper wincred
Now, run the git pull or push etc, it will prompt for a username and password dialog update with your new password and username.
If the none of the above commands worked on your machine, then try to the run the below command to update your git password.
git config --global --unset user.password