After an interrupted brew update because of a network issue, Homebrew appears to be broken:
brew update
$ brew update error: pathspec \'master\' did not match a
Fixed with the following commands:
$ cd `brew --prefix` $ git remote add origin https://github.com/Homebrew/homebrew.git $ git fetch origin $ git reset --hard origin/master $ brew update Already up-to-date.