$ cd `brew --prefix`
$ git remote add origin https://github.com/mxcl/homebrew.git
$ git fetch origin
$ git reset --hard origin/master
$ brew update
转自【http://stackoverflow.com/questions/9370552/brew-update-failure-while-executing-git-checkout】