I've running through a Xcode 5 tutorial and want to make some significant changes, but want to make this Xcode 5 project into a repository.
I've done some reading and you can add a repository by going to Xcode -> Preferences -> Accounts -> Add Respository -> Enter the repository address:
So what would I input here for a local repository (on my iMac) I'm wanting to work on?
Cheers.
I would do this from the command line.
Xcode.app
Terminal.app
$ cd /path/to/project/dir
$ git init .
.gitignore
file to ignore some of the Xcode and output files that you don't want tracked (see below).$ git add .gitignore
$ git add .
$ git commit -a -m Initial.
Sample (but incomplete) .gitignore
file:
build/
*/xcuserdata/
And most likely you'll want to add a remote tracking repo, perhaps on github or bitbucket (once a bare repo has been created there):
$ git remote add origin https://bitbucket.org/yourname/yourrepo.git
$ git push -u origin --all
$ git push -u origin --tags
When you open the Xcode project next time it will be ready for Source Code use.
Apple's official solution is here. See "Use Git to Manage an Unmanaged Workspace Directory on a Development Mac"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With