检查是否安装git
优先检查系统中是否已安装git,打开终端/Terminal,输入命令:
git --version
xcode安装git
复制命令至终端:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
安装homebrew
将homebrew镜像修改为国内镜像
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"