由于网络问题,brew update
被中断后,Homebrew 似乎出现了故障:
$ brew update
error: pathspec 'master' did not match any file(s) known to git.
Error: Failure while executing: git checkout -q master
查看 /usr/local
Git 仓库,发现没有远程仓库。
$ cd `brew --prefix`
$ git remote -v
$
/usr/local at owne-pc (master ✔)% brew update
error: Failed connect to github.com:443; Operation timed out while accessing https://github.com/mxcl/homebrew.git/info/refs
fatal: HTTP request failed
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
- Sarah Vesselsgit reset --hard origin/master
之后,我不得不运行git clean -f
。 - Michael Stalker