Xcode4: Adding Local Git Repository to a Xcode3 project

Shooter 2 Secret Area

With the new version of xcode4 it comes with the option to version control source code locally.

However when opening old Xcode3 projects, it does not ask you if you want to add a local repository.

To add one is simple, open up Terminal and navigate to your xcode project folder.

Now enter the following without quotes:

“git init”

“git add .”

Depending on the size of your project folder, it may take a little time before it finishes. Once done, reboot xcode and your project should now be detected by xcode4 as under source control.

I had to recommit all my files before it showed up properly the organiser.

  • File Menu
  • Source Control > Commit…
  • Click Commit