Http & Https Proxy
在國內(nèi)git-remote-https下載上傳的速度特別慢遍膜,有時(shí)候就十來KB。 給Git設(shè)置一個(gè)網(wǎng)絡(luò)代理速度翻幾十倍。
查看SS的本地端口
我的是1086
image.png
設(shè)置代理
git config --global http.proxy socks5://127.0.0.1:1086
git config --global https.proxy socks5://127.0.0.1:1086
查看
git config --global http.proxy
git config --global https.proxy
停用代理
git config --global http.proxy ""
git config --global https.proxy ""
pull --rebase
在合作項(xiàng)目里看到提交樹上一堆的merge點(diǎn)很難忍受特笋。推薦用pull --rebase
具體分析看這里http://hungyuhei.github.io/2012/08/07/better-git-commit-graph-using-pull---rebase-and-merge---no-ff.html
配置后git pull 自動(dòng)執(zhí)行 git pull --rebase
branch.<name>.rebase
只在某個(gè)分支上使用
git config branch.<name>.rebase true
branch.autosetuprebase
為每個(gè)新分支設(shè)置
git config branch.autosetuprebase always
可選項(xiàng)還有 never
, remote
, local
pull.rebase
git config --bool pull.rebase true
加上-global就是全局設(shè)置了
git config --global pull.rebase true