问题描述:
在进行brew update时,发生错误,如下:
% brew update
fatal: Could not resolve HEAD to a revision
Already up-to-date.
解决办法:
思路:
1)找到出错的homebrew的目录;
2) 进入到该目录,执行fetch 和 pull命令。
1)运行“brew update --verbose”,找到出错的homebrew的目录:
% brew update --verbose
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Fetching /usr/local/Homebrew...
Updating /usr/local/Homebrew...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to and reset branch 'maste