Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jonahgeek/e024e2a9a937b418a5c7c9a89d8e494d to your computer and use it in GitHub Desktop.
Save jonahgeek/e024e2a9a937b418a5c7c9a89d8e494d to your computer and use it in GitHub Desktop.
brew install and brew update hang with error: 'refs/remotes/origin/master': unknown revision or path not in the working tree.

What are you were trying to do?

A fresh install of homebrew on OSX, or any other brew installation;

What happened?

Installation hangs with the error:

error: Not a valid ref: refs/remotes/origin/master
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>...]'

SOLUTION

rm -fr $(brew --repo homebrew/core)  # because you can't `brew untap homebrew/core`
brew tap homebrew/core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment