If you’re searching a quicker way to save your git credentials on Linux, there is a one line command for it that will save your life.
The idea is to put your credentials in the cache and give it a lifetime.
It works fine!
git config --global credential.helper 'cache --timeout 36000'
Hope this will help you.