All platforms:
Store credentials in a plaintext file on disk:
git config --global credential.helper store
OR
Cache credentials in memory for 1 hour:
git config --global credential.helper 'cache --timeout=3600'
Mac OS X:
Store credentials in the OS X keychain:
git config --global credential.helper osxkeychain
Windows:
??
Reference:
https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage
https://git-wip-us.apache.org/