通過homebrew安裝Git
1、安裝homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2、安裝git
brew install git
3、安裝成功后,在終端輸入git,返回如下圖所示表示安裝成功
問題記錄:
問題描述:Downloading Command Line Tools for Xcode卡住然后失敗
解決方法:
1、appstore下載xcode
2、 查看xcode版本
3、下載xcode對應版本的Command Line Tools
https://developer.apple.com/download/more/