Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Problem installing git on yosemite #37150

Closed
markaduffy opened this issue Feb 24, 2015 · 5 comments
Closed

Problem installing git on yosemite #37150

markaduffy opened this issue Feb 24, 2015 · 5 comments

Comments

@markaduffy
Copy link

Having problems installing git with homebrew on yosemite 10.10.2. Tried every past solution available. I do have write permissions on /usr/local. I can do brew update and brew doctor with no issues, but it says I have git-git (whatever that is) already installed. I have oh-my-zsh shell. i have xcode with git and atom installed if that may be relevant. I tried using bash shell, and got same issue.

Last login: Tue Feb 24 09:56:18 on console
    You have new mail.

# user at mymac in ~ [9:57:48]
$ brew install git
Error: git-git already installed
To install this version, first `brew unlink git'

# user at mymac in ~ [9:57:54]
$ brew unlink git
Error: No such keg: /usr/local/Cellar/git

# user at mymac in ~ [9:58:04]
$ brew update
Updated Homebrew from b33e8a75 to cf5325ac.
==> New Formulae
deisctl         gcovr       pdf-redact-tools
==> Updated Formulae
activemq    couchdb-lucene  hamsterdb   libgadu     redpen
avian       datomic     httpie      libmpdclient    unittest
berkeley-db gtk-gnutella    ice     mysql
cctools     h2o     ipsumdump   mysql-cluster

# user at mymac in ~ [10:01:04]
$ brew doctor
Your system is ready to brew.

# user at mymac in ~ [10:01:25]
$ brew install git
Error: git-git already installed
To install this version, first `brew unlink git'

# user at mymac in ~ [10:01:30]
$ brew unlink git
Error: No such keg: /usr/local/Cellar/git

# user at mymac in ~ [10:01:35]
$ brew link git
Error: No such keg: /usr/local/Cellar/git

# user at mymac in ~ [10:01:44]
$ git --version
zsh: command not found: git

# user at mymac in ~ [10:02:01]
$ brew --version
0.9.5

# user at mymac in ~ [10:06:17]
$ git-git --version
zsh: command not found: git-git

# user at mymac in ~ [10:11:32]
$ which git-git
git-git not found

With Bash

mymac:~ user$ git --version 
    -bash: git: command not found 
    mymac:~ user$ brew install git 
    Error: git-git already installed To install this version, first `brew    unlink git' 
    mymac:~ user$ –
@markaduffy markaduffy changed the title Problem installing git Problem installing git on yosemite Feb 24, 2015
@markaduffy
Copy link
Author

So you know the whole picture, i reinstalled git successfully from the git website, and it worked again from bash. I had to add the following path in .zshrc which was /usr/local/git/bin.

@xu-cheng
Copy link
Member

What's the result of ls /usr/local/Cellar? And can you try brew prune?

@markaduffy
Copy link
Author

# user at mymac in ~/dev/myhubot on git:master o [13:50:22]
$ ls /usr/local/Cellar

# user at mymac in ~/dev/myhubot on git:master o [13:55:35]
$ brew prune
Pruned 0 dead formulae
Tapped 1 formula

@jacknagel
Copy link
Contributor

Take a look at the resolution in #37250, this looks like the same issue.

@jacknagel
Copy link
Contributor

Presuming fixed per this comment #37250 (comment)

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants