https://help.github.com/articles/caching-your-github-password-in-git/
In Terminal, enter the following:
git config --global credential.helper cache
To change the default password cache timeout, enter the following:
git config --global credential.helper 'cache --timeout=3600'