1. 程式人生 > >Mac系統git clone 慢【解決方案】

Mac系統git clone 慢【解決方案】

image ast png 命令 ima 蝸牛 hosts shc sts

剛入手mac系統,準備從git上clone代碼,蝸牛般的網速,就我這暴脾氣必須盤它。so有了下面的幾行命令

只需在/etc/hosts文件裏面增加幾行ip映射就可以了。

1 151.101.76.249 github.global.ssl.fastly.net 
2 192.30.253.112 github.com

將上面兩行ip映射關系追加在/etc/hosts文件後面即可。接下來要讓這個變更生效就可以了。

執行

sudo dscacheutil -flushcache

效果如下:

技術分享圖片

Mac系統git clone 慢【解決方案】