GitHub is amazing; I am eternally grateful to be born in an age where there is free, accessible, distributed version control software (Git), that is moreover centralized/backed up in The Ether. But there sometimes is a slight hitch: Github creates the online repository, but Xcode creates the new project. How can I create a new project in Xcode that is simultaneously tracked in its own Github repo?
How to Create a new Xcode project + GitHub repo [almost] Simultaneously
My solution is the same as associating an existing project with an existing repo. This is my workflow:
- Create the project locally.(If you don’t know, try Treehouse or CodeSchool)
- Create the repo on GitHub. (again, Treehouse, or CodeSchool)
- Copy the repo’s SSH from GitHub.
- Initialize the local git repo, and add the remote to the local repo.
// ♥ git remote add origin email@example.com:AmitaiB/DataStructures-ObjC.git
// ♥ git pull origin master
// ♥ git push -u
- Pull, Push.