解决unknown revision or path not in the working tree

6 min read
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.

然后还报github安装错误的。

**==> Downloading and installing Homebrew...**

remote: Enumerating objects: 5, done.

remote: Counting objects: 100% (5/5), done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 5 (delta 3), reused 5 (delta 3), pack-reused 0

Unpacking objects: 100% (5/5), done.

From https://github.com/Homebrew/brew

145f29fc5..a98bbbc64 master  -> origin/master

HEAD is now at a98bbbc64 Merge pull request #6305 from Homebrew/dependabot/bundler/docs/html-proofer-3.11.1

fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions, like this:

'git <command> [<revision>...] -- [<file>...]'

^C-e:68:in `system': Interrupt

from -e:68:in `system'

from -e:360:in `block in <main>'

from -e:342:in `chdir'

from -e:342:in `<main>'

struckoverflow上给出的方法就是:

rm -rf /usr/local/var/homebrew/