Link an Existing Project to GitHub

Amitai Blickstein
EyeOhEssBlog
Published in
1 min readFeb 29, 2016

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:

  1. Create the project locally.(If you don’t know, try Treehouse or CodeSchool)
  2. Create the repo on GitHub. (again, Treehouse, or CodeSchool)
  3. Copy the repo’s SSH from GitHub.
GitHub BlogPost media-1
  1. Initialize the local git repo, and add the remote to the local repo.
  2. // ♥ git remote add origin git@github.com:AmitaiB/DataStructures-ObjC.git
  3. // ♥ git pull origin master
  4. // ♥ git push -u
  5. Pull, Push.
Screen shot of my Terminal
A linked repo is born!

--

--