brew update无法正常使用
解决方案
运行如下命令添加 Git 信任目录homebrew-core、homebrew-cask、homebrew-services
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-services
同样如果要取消之前添加的 Git 信任目录运行如下命令即可
git config --global --unsetsafe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
git config --global --unsetsafe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
git config --global --unsetsafe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-services
运行如下命令可查看 Git 全局配置
git config --global --list