0

I'm brand new to RoR and am following along a tutorial and am at this step http://railstutorial.org/chapters/beginning#sec:git_setup but I can't get git init to work.

I thought I had Git installed per

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

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
/usr/local/git/bin/:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec

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

1
  • 2
    All the info is helpful, but how about showing us the output when you try and actually run git init.
    – Zoredache
    Oct 26, 2010 at 23:12

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .