I am Hack Sparrow
Captain of the Internets.

Homebrew update Error – cocot.rb

If you ever come across this error while trying to update homebrew on your Mac:

error: The following untracked working tree files would be overwritten by merge:
    Library/Formula/cocot.rb
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

just, do this:

$ rm /usr/local/Library/Formula/cocot.rb 

I have no idea what cocot.rb is for, or where it came from. All I know is that it is preventing homebrew from updating, so I just deleted it, and everything was fine again.

In case you are afraid to delete, do this instead:

$ mv /usr/local/Library/Formula/cocot.rb /usr/local/Library/Formula/cocot.rb.bak

Once done, update homebrew successfully:

$ brew update
... Updated Homebrew from 8d9fd732 to 560df359.

Partay!

Make a Comment