$ brew update
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
solution:
First run the following to ensure you own everything under /usr/local
:
sudo chown -R $(whoami):admin /usr/local
Then reset your Homebrew repo to a clean state:
cd /usr/local && git fetch && git reset --hard origin/master
replace
/usr/local
with
$(brew --prefix)
if you installed Homebrew elsewhere