skip87
skip87

Reputation: 529

error with git (-bash: git: command not found)

I am having trouble with git command. I'm getting -bash: git: command not found. It's reported as installed when I run $ gem list, and i've put its path on my .profile as you can see below. I just don't understand how come it doesn't work. Thanks for the help

# MacPorts Installer addition on 2012-10-11_at_19:01:44: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
export PATH=${PATH}:/usr/local/mysql/bin

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

# git path

export PATH=$PATH:/usr/local/git/bin

Upvotes: 5

Views: 53092

Answers (2)

Pankaj Kumar Katiyar
Pankaj Kumar Katiyar

Reputation: 1494

On Mac: The best solution is to install Xcode and then go to Xcode - Preferences, and the Downloads. Here install Commandline Tools and you are good to go.

Upvotes: 0

poke
poke

Reputation: 388153

The git you have installed is a Ruby Gem that is used to access Git features from within Ruby. It does not come with the actual Git and as such does not include the command line git (I’m actually not sure if the Gem does not even need a normal Git installed).

So what you need to do is to download and install Git itself.

Upvotes: 3

Related Questions