$ brew update
fatal: Could not resolve HEAD to a revision
Already up-to-date.
$ brew update --verbose
Checking if we need to fetch /opt/homebrew...
Checking if we need to fetch /opt/homebrew/Library/Taps/homebrew/homebrew-cask...
Fetching /opt/homebrew...
Checking if we need to fetch /opt/homebrew/Library/Taps/homebrew/homebrew-core...
Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-core...
Updating /opt/homebrew...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to and reset branch 'master'
Your branch is up to date with 'origin/master'.
Switched to and reset branch 'stable'
Current branch stable is up to date.
# 进入这个地址
Updating /opt/homebrew/Library/Taps/homebrew/homebrew-core...
fatal: Could not resolve HEAD to a revision
Already up-to-date.
$ cd /opt/homebrew/Library/Taps/homebrew/homebrew-core
homebrew-core (master) » ll
total 0
drwxr-xr-x 3 machao admin 96 12 2 12:14 .
drwxr-xr-x 4 machao admin 128 12 2 12:49 ..
drwxr-xr-x 12 machao admin 384 12 2 14:20 .git
# 从新操作
$ git fetch --prune origin
$ git pull --rebase origin master
From https://mirrors.ustc.edu.cn/homebrew-core
* branch master -> FETCH_HEAD
$ brew update
Already up-to-date.