OS X Brew – “Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master”

In the middle of a `brew update`, I killed the process with ctrl+c.  This left the git repo in a broken state.


Please move or remove them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

To fix:

$ cd /usr/local
$ git add .
$ git stash
$ git reset --hard

`brew update` should now work.

One thought on “OS X Brew – “Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master””

Leave a Reply

Your email address will not be published. Required fields are marked *