Error while trying to update brew package manager

Chiron picture Chiron · Aug 4, 2011 · Viewed 33.7k times · Source

I tried to update brew:

sudo brew update

But I got this error:

error: Your local changes to the following files would be overwritten by merge:

Listing a lot of files

Error: Failed while executing git pull http://github.com/mxcl/homebrew.git master

Any idea what is going wrong?

Answer

Turadg picture Turadg · Aug 7, 2011

There was a bug in Homebrew that was fixed just a few days ago. To fix the bug you can run git reset --hard FETCH_HEAD inside your Homebrew installation. Since that won't fix files that are already seen as modified you can also run git checkout Library to replace your checkout with the latest files. (That wipes all edits so take appropriate measures with any you made.)