4

Since my latest update of Homebrew (to 1.0.0), instead of just seeing

Checking out v1.0.1 in /usr/local/Homebrew...

when I brew update or brew upgrade --all I now see

Checking out v1.0.1 in /usr/local/Homebrew...
To checkout v1.0.1 in /usr/local/Homebrew run:
  'cd /usr/local/Homebrew && git checkout v1.0.1

Is that an error I should do something about? What's going on here? Are updates no failing for me?

orome
  • 45,163
  • 57
  • 202
  • 418

1 Answers1

6

I had the same problem. Found the solution in this question, which is very similar to yours:

cd $(brew --prefix)/Homebrew && git fetch && git reset --hard origin/master

It seemed to be caused by a difference in "prefix" and "repository" directories for homebrew.

Community
  • 1
  • 1
17xande
  • 2,430
  • 1
  • 24
  • 33
  • Will I need to do that just once (to fix a bug or some incoherent stat on my end?) or each time I update? – orome Sep 22 '16 at 13:00
  • @raxacoricofallapatorius I'm not sure yet, I suppose we'll find out next time a change is pushed to homebrew, which should be pretty soon. – 17xande Sep 22 '16 at 13:03
  • 1
    [Now I get "no git repository".](http://stackoverflow.com/q/39642691/656912) – orome Sep 22 '16 at 15:08
  • 1
    taking a closer look at the original answer, there is a comment by @yuri-tkachenko that seems to have the correct "full" fix for this problem. I've updated my answer to reflect that fix. – 17xande Sep 22 '16 at 15:33
  • Aren't `(brew --prefix)/Homebrew` and `brew --repository` the same? If not, is there something I need to undo, having run the original answer? – orome Sep 22 '16 at 16:45
  • And I [still get](http://stackoverflow.com/q/39642691/656912) `HOMEBREW_VERSION: >1.0.0 (no git repository)` when I `brew --config`. Is that just a bug that we need to wait to have fixed? – orome Sep 22 '16 at 16:48
  • I get `-bash: git: command not found`, all thanks to the "I strongly recommend" in this answer: http://stackoverflow.com/questions/8957862/how-to-upgrade-git-to-latest-version-on-mac-os-x – hello_there_andy Feb 27 '17 at 19:09