Git: command not found during Git installation (Mac OSX 10.6)

gitsnow leopardterminal

I am trying to install Git on my Mac (OSX 10.6) following the official Git tutorial.

I had no problem until I had to set my username and my email.

Every time I tried I got -bash: git: command not found

I tried echo 'export PATH=/usr/local/git/bin:$PATH' >> ~/.profile + restarted the Terminal. It still doesn't work.

What do you think I should do to solve the problem?

I've never used the OSX GIT installer before and don't really want to.

Edit 1: the command issue is fixed

Edit 2: the result of the command /usr/bin/grep PATH .* is

.bash_history:echo 'export PATH=/usr/local/git/bin:$PATH' >> ~/.profile
.bash_history:echo $PATH
.bash_history:echo $PATH
.bash_history:echo 'export PATH=/usr/local/git/bin:$PATH' >> ~/.profile
.bash_history:echo $PATH
.bash_history:echo 'export PATH=/usr/local/git/bin
.bash_history::$PATH' >> ~/.profile
.bash_history:echo 'export PATH=/usr/local/git/bin
.bash_history:echo 'export PATH=/usr/local/git/bin
.bash_history:echo 'export PATH=/usr/local/git/bin
.bash_history::$PATH' >> ~/.profile
.bash_history:echo 'export PATH=/usr/local/git/bin:$PATH' >> ~/.profile
.bash_history:echo $PATH
.bash_history:echo 'export PATH=/usr/local/git/bin:$PATH' >> ~/.profile
.bash_history:echo $PATH
.bash_history:echo $PATH
.bash_history:echo $PATH
.profile:export PATH=/usr/local/git/bin:$PATH
.profile:export PATH=/usr/local/git/bin:$PATH
.profile:export PATH=/usr/local/git/bin:$PATH
.profile:export PATH=/usr/local/git/bin:$PATH
.profile:export PATH=/usr/local/git/bin:$PATH
.profile:export PATH=/usr/local/git/bin:$PATH

Best Answer

Where did you install git to? Different install methods will put it in different places. Double check your install process. On my machine i have it in /usr/bin/

You need to ensure your PATH contains the directory that the git lives in.

You can either run locate git to search for it, you'll probably have to build your locate database if you haven't already.

Of you can just try a few typical places

/usr/bin/git --version

Once you know where it is installed, can modify your PATH file by editing .profile or .bash_profile to add the appropriate value.