设置用户 git config --global user.name "jiangchun"
设置邮箱 git config --global user.email djc16@qq.com
查看用户名 git config user.name
查看邮箱 git config user.email
查看其他配置信息 git config --list
保存密码 git config --global credential.helper store
浅克隆 git clone --depth=1 https://github.com/XXX.git
查看远程仓库地址 git remote -v
查看远程仓库 git remote
删除远程仓库 git remote rm origin
添加远程仓库 git remote add origin http://xxxx/xxx.git
本地分支与远程分支建立联系 git push --set-upstream origin master
查看所有分支 git branch
查看本地和远程仓库的所有分支 git branch -a
创建并切换分支 git checkout -b dev (或git branch dev git checkout dev)
删除分支 git branch -d dev
新建分支并切换 git checkout -b dev remotes/origin/dev
查看tag git tag -l -n
#设置代理
git config --global http.proxy http://127.0.0.1:10809
git config --global https.proxy https://127.0.0.1:10809
git config --global http.proxy 'socks5://127.0.0.1:10808'
git config --global https.proxy 'socks5://127.0.0.1:10808'
#取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy