git config --global user.name "your username"
git config --global user.password "your password"
git config --global credential.helper store
$ git config --global github.user defunkt
$ git config --global github.token 6ef8395fecf207165f1a82178ae1b984
Applications and scripts can easily access this information:
$ git config --global github.user
defunkt
// for storing globally
git config --global credential.helper store
git push origin <your branch>
//for folder specific
git config credential.helper store
git push origin <your branch>
// after pushing once with password from next time it wont ask for password
git config --global credential.helper store
git pull
git config --global credential.helper "cache --timeout=3600"