执行命令
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
按提示操作就行
虽然选择了国内镜像源,执行brew install xx 还是报错
fatal: not in a git directory
Error: Command failed with exit 128: git
执行brew -v
按上面提示操作,再执行brew install xx 就好了