Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm brand new to RoR and am following along a tutorial and am at this step but I can't get git init to work.

I thought I had Git installed per

   MacBook-Pro:~ capestany$ git --version 
   git version

But the only way I can get that to appear at all is by doing

  MacBook-Pro:~ capestany$ export PATH=/usr/local/git/bin/:$PATH
  MacBook-Pro:~ capestany$ git

I don't really know what I'm doing in terminal, are my paths or permissions wrong? Here's some more stuff when I echo the path:

  MacBook-Pro:~ capestany$ echo $PATH

Yes, I'm a newbie! So what do I need to do to get Git working in my Rails directories?

share|improve this question
All the info is helpful, but how about showing us the output when you try and actually run git init. – Zoredache Oct 26 '10 at 23:12

To avoid exporting your PATH each time you want to use git, you can put it in your .profile

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

Put this at the bottom of your .profile and each time you start up, you'll have git right away.

After you type git init in the folder where you want to start a repository, you should see

Initialized empty Git repository in /path/to/repo/.git/

If you ls the folder, you won't see anything because it is a hidden folder. Finder will not show you anything either. But typing git status will show that you are on the master branch and ready for your initial commit.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.