Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot update Homebrew: git not detected properly #519

Closed
SaladFork opened this issue Jul 15, 2016 · 5 comments
Closed

Cannot update Homebrew: git not detected properly #519

SaladFork opened this issue Jul 15, 2016 · 5 comments

Comments

@SaladFork
Copy link

SaladFork commented Jul 15, 2016

Trying to update:

$ brew update
Warning: git-2.8.1 already installed
Error: Git must be installed and in your PATH!

Doctor:

$ brew doctor
Your system is ready to brew.

Versions:

$ which -a git
git: aliased to hub
/usr/local/bin/git
/usr/bin/git

$ git --version
git version 2.8.1
hub version 2.2.3

$ /usr/local/bin/git --version
git version 2.8.1

$ /usr/bin/git --version
git version 2.7.4 (Apple Git-66)

$ brew --version
Homebrew 0.9.9 (git revision a02be; last commit 2016-07-15)
Homebrew/homebrew-core (git revision 34ac0; last commit 2016-04-19)

Ensuring brew is latest:

$ cd /usr/local
$ git remote -v
origin  https://github.com/Homebrew/brew.git (fetch)
origin  https://github.com/Homebrew/brew.git (push)

$ git fetch
$ git reset --hard origin/master
$ git log --pretty=medium | head -n 5
commit a02be9eea204264ce48827ac365c8b53b986d66a
Author: Mike McQuaid <mike@mikemcquaid.com>
Date:   Fri Jul 15 19:03:45 2016 +0100

    ENV: move to new paths. (#507)
DomT4 referenced this issue Jul 15, 2016
Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
  all superenv wrappers and all symlinks to the same version. We never needed
  the "separate shims for separate versions" functionality and it just adds
  confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
  things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
  used by or related to superenv (or stdenv) in any way.
@SaladFork
Copy link
Author

Thanks! Gotta love my timing...

@DomT4
Copy link
Member

DomT4 commented Jul 15, 2016

You may need to:

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

To escape the error. Should only need doing once if brew update remains stuck.

@SaladFork
Copy link
Author

Thanks again! I'm good now.

@MikeMcQuaid
Copy link
Member

@SaladFork Out of interest: did you need to do that?

@SaladFork
Copy link
Author

Oh no, hate to disappoint but I ran it prior to trying another update just to be sure.

souvik1997 pushed a commit to souvik1997/brew that referenced this issue Jul 25, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants