Closed chrishough closed 12 years ago
Can you cd /usr/local
, perform git status
, and paste the output to gist.github.com?
yep, here you go: https://gist.github.com/2425123
OK, these seem to be files which exist in your repo that have been removed from Homebrew. Check over the list to make sure that none of them are files you created that you don't want to lose, then do:
git clean -df
This will delete ALL these files and directories, so double-check that there's nothing of yours there before you do!
If you git status
again, you should see that the working tree is clean and brew doctor
will be clean.
yep, I am good go to "Your system is raring to brew." Thank you
Thanks, that worked for me!!!!!
@mistydemeo Thanks!
@mistydemeo Thanks -- yep, same for me!
Also worked for me. Thanks.
Didn't know about this "git clean -df" command. It's working for me as well, had uncomitted change there. Many thanks !
Thanks! Worked for me too.
Thanks! Worked for me too.
Just a word of caution on git clean
: unlike git reset
it will destroy files that aren't part of Homebrew. We have a pretty good .gitignore
file that will check the destructive effects, but always, always run git clean -dn
first to do a "dry run" and make sure there is nothing important that is about to get blown away.
If you can't tell which files are important, then just skip the clean---getting rid of a doctor warning is not worth the risk of blowing your fingers off.
Thanks!
FWIW, running git clean -df
borked my brew install. Started getting errors about missing Ruby gems.
Was able to fix using the info from brew issue https://github.com/Homebrew/homebrew/issues/21002 (basically, reset the git head before trying a git clean:
cd /usr/local
git reset --hard origin/master
git clean -df
Brew is working great now!
Hoping this saves someone a bit of trouble in the future :)
I have been troubleshooting how to remove my final homebrew doctor error message and I can not seem to get rid of it:
Warning: You have uncommitted modifications to Homebrew's core. Unless you know what you are doing, you should run: cd /usr/local && git reset --hard
Stack Overflow: http://stackoverflow.com/questions/10238786/homebrew-brew-doctor-fail-message
Yes, I run the "cd /usr/local && git reset --hard" message but it never goes away. I discovered this trying to figure out when I can not get brew install mysql to run.