¶Caching GitHub password in Git
In Terminal, enter the following:
1 | git config --global credential.helper cache |
To change the default password cache timeout, enter the following:
1 | git config --global credential.helper 'cache --timeout=3600' |
Or alternatively, store forever:
1 | git config --global credential.helper store |
¶Revert local change to previous commit
1 | git checkout -- readme.txt # revert readme.txt to previous commit |
or
1 | git fetch --all |
¶Revert to status in another branch
1 | git checkout <other-branch-name> -- <path to your file_or_folder> |