Homebrew git checkout error

Software

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
https://github.com/mxcl/homebrew.git
git fetch origin
git reset --hard origin/master

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

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!