Brew update does not work after mac 10.9

The first launch of brew since the 10.9 update.

From the result below, just remove Library / Formula / ant.rb and Library / Formula / apple-gcc42.rb? In addition, it is not clear why git pull does not work. Thanks for any help

525 [projects]$ brew --config HOMEBREW_VERSION: 0.9.4 ORIGIN: https://github.com/mxcl/homebrew.git HEAD: 27c26faf7b958de6028ad55be8ccc5a57b094d3f HOMEBREW_PREFIX: /usr/local HOMEBREW_CELLAR: /usr/local/Cellar CPU: 8-core 64-bit ivybridge OS X: 10.9-x86_64 Xcode: 5.0.2 GCC-4.2: build 5666 LLVM-GCC: build 0 Clang: 5.0 build 500 X11: N/A System Ruby: 1.8.7-358 Perl: /usr/bin/perl Python: /usr/bin/python Ruby: /Users/*****/.rvm/rubies/ruby-2.0.0-p195/bin/ruby 526 [projects]$ brew update error: The following untracked working tree files would be overwritten by merge: Library/Formula/ant.rb Library/Formula/apple-gcc42.rb Please move or remove them before you can merge. Aborting Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master 
+53
homebrew
Nov 21 '13 at 22:52
source share
6 answers

It fixed it for me

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

Brew update worked fine after that

+163
Nov 22 '13 at 6:51
source share

Decision

You can still find ..

brew update doesn't work after git pull origin master

Here is what you need to do.

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

You may now have git on your system, but what will it do now.

Your broken brew update will be automatically updated before the first launch.

Here is a link to the original problem in HomeBrew. brew stuck

+6
Oct. 25 '16 at 8:45
source share

I simply deleted the .git directory inside the /usr/local directory, then brew update .

+5
Sep 14 '16 at 14:26
source share

I did this to solve the problem

 cd /usr/local git pull origin master 
+2
Sep 08 '15 at 10:59
source share

My brew update hung and did nothing. I am on OSX 10.12.5, and none of the above worked for me, and I do not have .git in usr/local , only in usr/local/Homebrew .

I ran brew update --debug --verbose and brew update and fixed the problem by looking at this problem: https://github.com/Homebrew/brew/issues/895

+1
May 29 '17 at 23:37
source share

What worked for me was to update the brew like this :

 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 
0
May 07 '19 at 9:15
source share



All Articles