0

I downloaded and installed GitHub (latest version) for OS X, installed command line utility under Github in the application and am coming up with an error trying to create my first readme file in a repo entitled "basic-twitbstrap".

Macbooks-MacBook-Pro-2:basic-twitbstrap macbook$ git init
-bash: git: command not found
Max
  • 1
  • 2

2 Answers2

0

If they're not installed in standard location, command-line programs need some environment modifications to be called, which consists in adding their directory to the PATH environment variable.

So in your case you need to add /usr/local/github to your path, see how.

CharlesB
  • 86,532
  • 28
  • 194
  • 218
  • Macbooks-MacBook-Pro-2:basic-twitbstrap macbook$ /usr/local/github -bash: /usr/local/github: No such file or directory Macbooks-MacBook-Pro-2:basic-twitbstrap macbook$ usr/local/github git init -bash: usr/local/github: No such file or directory – Max Sep 13 '12 at 13:08
  • @Max: please say what you tried instead of copy-paste your commands – CharlesB Sep 13 '12 at 13:11
  • I tried to access the github in the /usr/local/github. It resulted in the error of "no such file or directory". – Max Sep 13 '12 at 14:28
  • I read how to alter the PATH to include git in the link above, however I cannot find the .profile in order to edit it. I tried to do "open .profile". It came up with the same error. – Max Sep 13 '12 at 14:30
0

I installed the latest version of Ruby Version Manager, then entered 'git' into the Terminal. It came up with a list of usage and common commands.

Now it runs.

Macbooks-MacBook-Pro-2:~ macbook$ git --version
git version 1.7.4.4
Max
  • 1
  • 2