How to add you xcode project to github

So you created a brand new xcode project and selected a local repository and are wondering how to add it to github?

Fear not, below steps to make it happen:


  1. Navigate to the path of your xcode project and run:
    git remote add foodTracker
  2. Pull the changes
    Git will complain of “fatal: refusing to merge unrelated histories”  solution”–allow-unrelated-histories” use the option
    git pull REPOSITORY master –allow-unrelated-histories
  3. Now you should be able to push from xcode

Other useful commands:

  • git show remote
  • git remote remove REPOSITORY

Happy coding!

Categories: Git

Leave a Reply