Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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 run git reset --hard HEAD; this will reset them all to their original state. Then try updating Homebrew.

share|improve this answer
    
I didn't change them intentionally. I have no idea what any of those files are even for! I'm wondering if they could have been changed by a previous aborted homebrew operation - does that sound plausible? –  Peter Hall Mar 4 '13 at 21:02
    
I definitely think that's plausible, but I think you should maybe raise this issue on the Homebrew GitHub page and see if they have a clear picture of what's going on here. –  echristopherson Mar 4 '13 at 23:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.