Unable to install git using homebrew

githomebrewterminal

I am trying to install git using homebrew:

brew install git

Terminal reads:

==> Searching for similarly named formulae… Error: No similarly named formulae found. Error: No available formula or cask with the
name "git".
==> Searching for a previously deleted formula (in the last month)… Error: No previously deleted formula found.
==> Searching taps on GitHub… Error: No formulae found in taps.

If I input brew doctor, I get the following:

Warning: Suspicious https://github.com/Homebrew/homebrew-core git
origin remote found. The current git origin is:
https://github.com/Homebrew/brew With a non-standard origin, Homebrew
won't update properly. You can solve this by setting the origin
remote: git -C
"/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote
set-url origin https://github.com/Homebrew/homebrew-core

However, if i do git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core, nothing changes and I get the same output with brew doctor

command line tools is installed:

xcode-select --install

xcode-select: error: command line tools are already installed, use
"Software Update" to install updates

I have tried reinstalling brew, brew update and brew cleanup

Any help would be greatly appreciated.

Best Answer

I don't know the problem with homebrew but there are other ways to load git. This link lists several ways to load git. If you've loaded the Xcode comand line tools git may already be installed. Type git --version to see if git is already installed. It was on my machine. The link also lists ways using MacPort.