- clear credential cache
git config --global --unset credential.helper
git config --system --unset credential.helper- set credential manager (windows)
git config --global credential.helper manager- multiple account (windows)
git config --global credential.github.com.useHttpPath true
- locally store credentials @.git/config
[credential]
helper = store
- locally store credentials
git config --global credential.helper store- cache credentials expire 15min
git config --global credential.helper cache- cache credentials for custom expire time
git config --global credential.helper 'cache --timeout=3600'- global set user info
git config --global user.name "frank"
git config --global user.email "[email protected]"- locally user info @.git/config
[user]
name = frank
email = [email protected]
@.gitignore
git checkout --orphan temp_branch
git add -A
git commit -am "init"
git branch -D master
git branch -m master
git push -f origin master
git reset origin/dev
git add --all
git commit -m 'my commit message'
git rm -rf --cached .
git ls-files | xargs wc -l
git config --global http.proxy http://localhost:7890