homebrewがupdateできなくなったとき

gitリセットする
http://blog.f13.jp/post/20626146392/brew-brew-update

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

エラーが出た.
/usr/local以下のフォルダの権限らしい.
http://qiita.com/sawa-@github/items/62e2ffc9cdc615e13583

sudo chown -R `whoami` /usr/local
cd /usr/local
git stash
git reset --hard origin/master
brew update