Home > Uncategorized > XCode – Creating a git repository for an existing project

XCode – Creating a git repository for an existing project

Today I spent ages trying to create a git repository for my existing XCode projects, after much googling and trial and error I finally worked it out.

My problem was that my Mac / XCode expects git to be in /usr/bin/git so I just had to create a symlink

1) sudo ln -s /usr/local/git/bin/git /usr/bin/git

2) CD to your project folder

3) Type git init

4) Type git add .

5) Type git commit -m “Initial Commit”

6) Re open XCode and it should now be working under the newly created git repository.

 

 

Categories: Uncategorized Tags: ,
  1. Jules
    August 21st, 2011 at 08:28 | #1

    I didn’t have the step one problem, as I recall. But it was a while ago. Think git is in the path. Remember the last steps.

    I think on the front screen of Xcode there’s an option to do this, I may be wrong

  1. No trackbacks yet.

Spam Protection by WP-SpamFree