If you get annoyed by git asking username and password every time you want to push or pull new changes, then let me tell you how you can set username and password globally to avoid this painful repetition.

Credential Helper

Git credential manager let you save your credentials. Just type the bellow command and hit enter.

git config --global credential.helper store

Next time you do pull or push, it asks for your credentials and save it.

Also, you can also cache for certain amount of time, instead of storing it for long term.

git config credential.helper cache <timeout>

git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600'

How to update the password?

If you want to change the git password

git config --global --unset user.password