Homebrew git checkout error

Icon from the Gnome desktop project
Homebrew giving you grief when attemting to perform a brew update?

Error: Failure while executing: git checkout -q master

You're not alone. Fortunately jacknagel's solution fixes the problem.

cd `brew –prefix`
git remote add origin
git fetch origin
git reset --hard origin/master

Allegedly there have been changes with git after Presumably the Homebrew folks will update their default installer, but this works in the meantime.