brew更新提示:fatal: not in a git directory
问题
homebrew-core和homebrew-cask /opt/homebrew/Library/Taps/homebrew/homebrew-services目录 被git认为不是一个安全的目录,需要手动添加
解决办法
git config --global --add safe.directory 你的homebrew-core路径
git config --global --add safe.directory 你的homebrew-cask路径