Mac 10.9 执行 brew update 报错 error: pathspec 'master' did not match any file(s) known to git.

想在Mac 上面安装 tomcat 结果总是提示失败,报错 404 ,应该是软件源过期了,因此执行

sudo brew update

可是悲剧的是却报告如下错误

$ sudo brew update

error: pathspec 'master' did not match any file(s) known to git.
Error: Failure while executing: git checkout -q master

网上搜寻了一下,找到解决方案

sudo rm -rf /usr/local/.git

然后再执行更新就正常了。

发布者