In Xcode 4 how do I add a remote GitHub repository to an existing local project?

I think I found the Xcode way to push a existing project to GitHub or any other remote repository!

Preconditions

  • I assume that you have a project created by Xcode 4 with a local git repository.
  • You created an empty remote git repository (I call it RemoteRepository in in the following example)

Push it to remote

  1. Open the Organizer in Xcode an go to the Repositories tab

  2. At first click on Remotes and then on “Add Remote”

    Xcode Organizer

  3. Enter a Remote Name and the Location of your remote repository and click on create

    Add a remote dialog

  4. Then select your project and open File -> Source Control -> Push ...

    open push dialog

  5. Select your remote repository and wait until it is connectable! Look for the Create in the brackets.

    push dialog

  6. Now your old project is published to GitHub

    result on GitHub

I hope it will works for you also! In my case it works with every remote git repository.

Please contact me on twitter if something unclear or wrote in bad English!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)