本人Android 開發(fā) 需要使用git,結(jié)果必須讓我下載一個xcode才能使用,非??拥?/p>
網(wǎng)上大家也是各種抄作業(yè),沒有成功的
基本報錯: Failed to connect to raw.githubusercontent.com port 443: Connection refused
廢話不多說,提供一個git 安裝包,一路安裝成功就好
git就可以正常使用了
輸入下面指令在終端運行即可安裝 Homebrew
,根據(jù)提示輸出相應(yīng)的指令
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
上面安裝成功Homebrew后,輸入下面指令
$ brew install git
安裝完git,打開AS,將/usr/bin/git替換成/usr/local/git/bin/git

image.png
補充
如果路徑不對,可以輸入命令: which git 查看對于的路徑配置,填寫上去即可

image.png
參考文獻:
https://git-scm.com/download/mac
https://stackoverflow.com/questions/31579670/change-xcrun-developer-path-for-android-studio-intellij