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 # 創建本地分支並切換到遠程分支