brew updateが失敗したとき

Homebrewのbrew updateコマンドがうまくいかない時の対応方法

```
MacBook-Pro:local hogehoge$ brew update
error: Your local changes to the following files would be overwritten by merge:
	Library/Contributions/brew_bash_completion.sh
	Library/Contributions/brew_zsh_completion.zsh
	Library/Contributions/cmd/brew-aspell-dictionaries
	Library/Contributions/cmd/brew-dirty.rb
	Library/Contributions/cmd/brew-graph
	Library/Contributions/cmd/brew-leaves.rb
	Library/Contributions/cmd/brew-linkapps.rb
	Library/Contributions/cmd/brew-ls-taps.rb
	Library/Contributions/cmd/brew-mirror-check.rb
	Library/Contributions/cmd/brew-pull.rb
	Library/Contributions/cmd/brew-server
	Library/Contributions/cmd/brew-switch.rb
	Library/Contributions/cmd/brew-test-bot.rb
	Library/Contributions/cmd/brew-unpack.rb
	Library/Contributions/cmd/git
	Library/Contributions/manpages/brew.1.md
	Library/ENV/4.3/cc
	Library/ENV/4.3/xcrun
	Library/Formula/aamath.rb
	Library/Formula/abcde.rb
	Library/Formula/abcm2ps.rb
	Library/Formula/abcmidi.rb
	Library/Formula/ace.rb
	Library/Formula/ack.rb
	Library/Formula/adobe-air-sdk.rb
	Library/Formula/agedu.rb
	Library/Formula/akka.rb
	Library/Formula/alac.rb
	Library/Formula/algol68g.rb
	Library/Formula/android-sdk.rb
	Library/Formula/antiword.rb
	Library/Formula/antlr.rb
	Library/Formula/anttweakbar.rb
	Library/Formula/apktool.rb
	Library/Formula/aplus.rb
	Library/Formula/apollo.rb
	Library/Formula/app-engine-java-sdk.rb
	Library/Formula/appledoc.rb
	Library/Formula/apt-dater.rb
	Library/Formula/arabica.rb
	Library/Formula/arangodb.rb
	Library/Formula/aria2.rb
	Library/Formula/asciidoc.rb
	Library/Formula/aspell.rb
	Library/Formula/assimp.rb
	Library/Formula/astyle.rb
	Library/Formula/asymptote.rb
	Library/Formula/auctex.rb
	Library/Formula/autoenv.rb
	Library/Formula/autojump.rb
	Library/Formula/automake.rb
	Library/Formula/autopano-sift-c.rb
	Library/Formula/avian.rb
	Library/Formula/avidemux.rb
	Library/Formula/avra.rb
	Library/Formula/avrdude.rb
	Library/Formula/axel.rb
	Library/Formula/bagit.rb
	Library/Formula/base64.rb
	Library/Formula/basex.rb
	Library/Formula/bazaar.rb
	Library/Formula/bbcp.rb
	Library/Formula/beanstalk.rb
	Library/Formula/beecrypt.rb
	Library/Formula/berkeley-db.rb
	Library/Formula/bibutils.rb
	Library/Formula/bigloo.rb
	Library/Formula/bind.rb
	Library/Formula/binutils.rb
	Library/Formula/bitlbee.rb
	Library/Formula/blitz.rb
	Library/Formula/blueutil.rb
	Library/Formula/bochs.rb
	Library/Formula/bogofilter.rb
	Library/Formula/boost.rb
	Library/Formula/boost149.rb
	Library/Formula/botan.rb
	Library/Formula/bsdconv.rb
	Library/Formula/bsdsfv.rb
	Library/Formula/bsponmpi.rb
	Library/Formula/buildapp.rb
	Library/Formula/bulk_extractor.rb
	Library/Formula/bullet.rb
	Library/Formula/bup.rb
	Library/Formula/bwm-ng.rb
	Library/Formula/byobu.rb
	Library/Formula/c-ares.rb
	Library/Formula/cabal-install.rb
	Library/Formula/cairo.rb
	Library/Formula/cairomm.rb
	Library/Formula/calcurse.rb
	Library/Formula/camlp5.rb
	Library/Formula/cantera.rb
	Library/Formula/casperjs.rb
	Library/Formula/cassandra.rb
	Library/Formula/cbmbasic.rb
	Library/Formula/ccache.rb
	Library/Formula/ccextractor.rb
	Library/Formula/cclive.rb
	Library/Formula/ccrypt.rb
	Library/Formula/cdargs.rb
	Library/Formula/cdo.rb
	Library/Formula/cfengine.rb
	Library/Formula/cfitsio.rb
	Library/Formula/cgal.rb
	Library/Formula/chcase.rb
	Library/Formula/check.rb
	Library/Formula/checkstyle.rb
	Library/Formula/cherokee.rb
	Library/Formula/chicken.rb
	Library/Formula/chipmunk.rb
	Library/Formula/chkrootkit.rb
	Library/Formula/chordii.rb
	Library/Formula/chromedriver.rb
	Library/Formula/chruby.rb
	Library/Formula/cimg.rb
	Library/Formula/clasp.rb
	Library/Formula/cloc.rb
	Library/Formula/clojure.rb
	Library/Formula/cloog.rb
	Library/Formula/closure-compiler.rb
	Library/Formula/cloudbees-sdk.rb
	Library/Formula/clpbar.rb
	Library/Formula/clutter.rb
	Library/Formula/cmake.rb
	Library/Formula/cmu-pocketsphinx.rb
	Library/Formula/cmu-sphinxbase.rb
	Library/Formula/cntlm.rb
	Library/Formula/cogl.rb
	Library/Formula/collada-dom.rb
	Library/Formula/collectd.rb
	Library/Formula/concurrencykit.rb
	Library/Formula/couchdb.rb
	Library/Formula/cpanminus.rb
	Library/Fo
error: The following untracked working tree files would be overwritten by merge:
	Library/Aliases/fishfish
	Library/Aliases/mosh
	Library/Contributions/cmd/brew-cleanup-installed
	Library/Contributions/cmd/brew-profile.rb
	Library/Contributions/cmd/brew-tap-readme.rb
	Library/Contributions/cmd/brew-test-bot.xml.erb
	Library/ENV/pkgconfig/10.9
	Library/Formula/acpica.rb
	Library/Formula/alembic.rb
	Library/Formula/apt-cacher-ng.rb
	Library/Formula/atari++.rb
	Library/Formula/aubio.rb
	Library/Formula/bashdb.rb
	Library/Formula/beansdb.rb
	Library/Formula/bibtexconv.rb
	Library/Formula/blitzwave.rb
	Library/Formula/boost-bcp.rb
	Library/Formula/bpm-tools.rb
	Library/Formula/brainfuck.rb
	Library/Formula/briss.rb
	Library/Formula/cardpeek.rb
	Library/Formula/caudec.rb
	Library/Formula/cctools-headers.rb
	Library/Formula/ccze.rb
	Library/Formula/cdk.rb
	Library/Formula/checkbashisms.rb
	Library/Formula/cityhash.rb
	Library/Formula/coin.rb
	Library/Formula/couchpotatoserver.rb
	Library/Formula/denominator.rb
	Library/Formula/depqbf.rb
	Library/Formula/dex2jar.rb
	Library/Formula/discodex.rb
	Library/Formula/docbook-xsl.rb
	Library/Formula/dub.rb
	Library/Formula/dvorak7min.rb
	Library/Formula/dyld-headers.rb
	Library/Formula/exenv.rb
	Library/Formula/ficy.rb
	Library/Formula/flow-tools.rb
	Library/Formula/frag_find.rb
	Library/Formula/fragroute.rb
	Library/Formula/fuzzy-find.rb
	Library/Formula/ghi.rb
	Library/Formula/gistit.rb
	Library/Formula/groonga-normalizer-mysql.rb
	Library/Formula/gssdp.rb
	Library/Formula/gtkglarea.rb
	Library/Formula/gupnp.rb
	Library/Formula/hardlink.rb
	Library/Formula/hubflow.rb
	Library/Formula/ip_relay.rb
	Library/Formula/ld64.rb
	Library/Formula/libarchive.rb
	Library/Formula/libbind.rb
	Library/Formula/libgetdata.rb
	Library/Formula/libgnomecanvasmm.rb
	Library/Formula/libmowgli.rb
	Library/Formula/libunwind-headers.rb
	Library/Formula/liquidprompt.rb
	Library/Formula/log4shib.rb
	Library/Formula/logstash.rb
	Library/Formula/lrdf.rb
	Library/Formula/luvit.rb
	Library/Formula/matlab2tikz.rb
	Library/Formula/mkvdts2ac3.rb
	Library/Formula/morse.rb
	Library/Formula/mplayershell.rb
	Library/Formula/netperf.rb
	Library/Formula/newt.rb
	Library/Formula/opendetex.rb
	Library/Formula/opensaml.rb
	Library/Formula/osm2pgsql.rb
	Library/Formula/pdnsrec.rb
	Library/Formula/perl-build.rb
	Library/Formula/pgbadger.rb
	Library/Formula/pgtune.rb
	Library/Formula/pidgin.rb
	Library/Formula/pius.rb
	Library/Formula/pixz.rb
	Library/Formula/proxychains-ng.rb
	Library/Formula/pyenv.rb
	Library/Formula/pyxplot.rb
	Library/Formula/rbenv-aliases.rb
	Library/Formula/rbenv-use.rb
	Library/Formula/rbenv-whatis.rb
	Library/Formula/rolldice.rb
	Library/Formula/rpm.rb
	Library/Formula/ruby-install.rb
	Library/Formula/snownews.rb
	Library/Formula/sshtrix.rb
	Library/Formula/terminal-notifier.rb
	Library/Formula/timidity.rb
	Library/Formula/tinycdb.rb
	Library/Formula/tomee-webprofile.rb
	Library/Formula/ucspi-tcp.rb
	Library/Formula/unar.rb
	Library/Formula/unittest-cpp.rb
	Library/Formula/upnp-router-control.rb
	Library/Formula/vera++.rb
	Library/Formula/visionmedia-watch.rb
	Library/Formula/wry.rb
	Library/Formula/xctool.rb
	Library/Formula/xml-security-c.rb
	Library/Formula/xml-tooling-c.rb
	Library/Formula/yaze-ag.rb
	Library/Formula/ydict.rb
	Library/Formula/zopfli.rb
	Library/Formula/zsh-syntax-highlighting.rb
	Library/Formula/zshdb.rb
	Library/Homebrew/compat/env.rb
	Library/Homebrew/compat/fails_with_llvm.rb
	Library/Homebrew/compat/formula.rb
	Library/Homebrew/compat/hardware.rb
	Library/Homebrew/compat/macos.rb
	Library/Homebrew/compat/md5.rb
	Library/Homebrew/compat/version.rb
	Library/Homebrew/compat.rb
	Library/Homebrew/extend/enumerable.rb
	Library/Homebrew/extend/module.rb
	Library/Homebrew/formula_cellar_checks.rb
	Library/Homebrew/formulary.rb
	Library/Homebrew/python_helper.rb
	Library/Homebrew/requirements/fortran_dependency.rb
	Library/Homebrew/requirements/ld64_dependency.rb
	Library/Homebrew/requirements/macos_requirement.rb
	Library/Homebrew/requirements/python_dependency.rb
	Library/Homebrew/test/test_bo
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
```

[対処コマンド]
```shell
$ sudo chown -R `whoami` /usr/local
$ cd /usr/local
$ git reset --hard origin/master
```