git config --global http.proxy http://127.0.0.1:1081 #设置http代理 git config --global https.proxy https://127.0.0.1:1081 #设置https代理
git config --global http.proxy 'socks5://127.0.0.1:1081' #设置socks代理 git config --global https.proxy 'socks5://127.0.0.1:1081' #设置socks代理
git config --global core.autocrlf false #去除warning:LF will be replaced by CRLF警告
git rm -r --cached . #忽略文件不生效时使用如下命令后再提交
git config --global user.name "<name>" #配置用户名
git config --global user.email "<email>" #配置邮箱
git daemon --reuseaddr --base-path=. --export-all --verbose --enable=receive-pack #开启局域网访问 需cd到git工程根目录
git config --system core.longpaths true # 允许长文件名
git checkout -b test <name of remote>/test # 创建本地分支并切换到远程分支