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

I am having problems with the git command. I get -bash: git: command not found . It was reported as installed when $ gem list started, and I put its path on my .profile , as you can see below. I just don't understand why this is not working. 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 
+4
source share
2 answers

The git you installed is the Ruby Gem, which is used to access the Git functions from Ruby. It does not come with actual Git and, as such, does not include the git command line (Im actually not sure if Gem doesn't even need normal Git).

So you need to download and install Git .

+3
source

On Mac: The best solution is to install Xcode and then go to Xcode - Preferences and Downloads. Install Commandline Tools here, and you're good to go.

0
source

Source: https://habr.com/ru/post/1445310/


All Articles