Trying to update homebrew, I get this:
$ brew update
error: Your local changes to the following files would be overwritten by merge:
.gitignore
Library/Contributions/brew_bash_completion.sh
Library/Contributions/brew_fish_completion.fish
Library/Contributions/brew_zsh_completion.zsh
Library/Contributions/manpages/brew.1.md
Library/ENV/4.3/cc
Library/ENV/4.3/make
Library/ENV/4.3/xcrun
Library/ENV/libsuperenv.rb
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
CONTRIBUTING.md
Library/Aliases/ag
Library/Aliases/heroku
… etc…
Any way to just clean that up? Looks like it's using git under the hood?
Best Answer
That would depend on whether you care about local changes to those files. Did you change them yourself, or did you run a program that changed them, or something else?
If you didn't mean to change them at all,
cd /usr/local
and rungit reset --hard HEAD
; this will reset them all to their original state. Then try updating Homebrew.