As in the topic - i have a project that doesn't have Source Control enabled, so how (and if) can i enable it now? I use Snapshots but the project became a big one, and now i need some more "pro" tools. I'm still rather an xcode beginner, so please explain it like i was a cow.
-
possible duplicate of [Putting existing project under source control in Xcode 4.3.2](http://stackoverflow.com/questions/11054240/putting-existing-project-under-source-control-in-xcode-4-3-2) – Undo Aug 20 '14 at 20:41
3 Answers
First off you'll have to install the command line tools for github. You can do so from this link http://mac.github.com/, then either during setup it will ask you to install command line tools, or if it doesn't, you can do it from the preferences menu. Once this is completed, you will be able to follow the instructions on this website to convert your project: conversion tutorial. After all that is done, this website explains everything you could possibly want to know about Source Control and all you can do with it.
EDIT
If you do not want to install github for the command line tools, you can install Homebrew, which is a package manager (macs equivalent to apt-get), then run brew install git
for the latest version of git.

- 8,520
- 7
- 41
- 77
-
2Best answer! I tried `git init`, but it was throwing an error `git: command not found`. After installation everything works perfectly (had some problems in Terminal, but i'm not very familiar with it, nevermind). – cyborg86pl Jul 22 '13 at 15:29
-
Found Rob van der Veer's answer below helpful as a supplement to this one. – inorganik Aug 21 '15 at 16:41
After doing a git init
,go you the projects tab in the Organizer (top right corner in xcode) There remove the reference to your project and restart xcode to update the changes. Removing the project from Organizer will not delete any files, it will only clear the caches.

- 1,148
- 1
- 7
- 20
I am not sure how to do this from within XCode, but if you are on OSX you can easily initialize git from the command line (within Terminal). From the base directory of the project invoke git init
.
Once the project is associated with a git repository, XCode should recognize that and you will see the project listed among the repositories in XCode's Organizer (available from the Window -> Organizer menu)
To upload the project into github, look at the directions here: https://help.github.com/articles/create-a-repo

- 604
- 4
- 7