How to let git save your username and password forever

You know, sometimes, you have to use the HTTPS link to work with git.
In this case, you probably don’t wanna input your username and password again and again.
If that’s the situation you are in, you could use the following command to save your git username and password forever:

git config --global credential.helper store

If you want to disable it, set a timeout: 

sudo git config --system --unset credential.helper