Brew Update not working after mac 10.9

I simply removed the .git directory inside of the /usr/local directory, then ran the command brew update.


My brew update was hanging and doing nothing. I am on OSX 10.12.5 and none of the above worked for me and I have no .git in usr/local, only in usr/local/Homebrew.

I ran brew update --debug --verbose and brew update and that fixed the issue, see this issue: https://github.com/Homebrew/brew/issues/895


This fixed it for me

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

brew update worked fine after that


Solution

You might still find..

brew update not working after git pull origin master

Here what you need to do.

cd /usr/local git pull origin master brew install git

Now you might already have git on your System, but what this will do it that now.

Your broken brew update will automatically be updated before at first run..

Here is the link to the origin issue in HomeBrew. brew stuck

Tags:

Homebrew