I think I found Xcode's way of pushing an existing project to GitHub or any other remote repository!
Prerequisites
I assume that you have a project created by Xcode 4 with a local git repository. You created an empty git remote repository (I call it RemoteRepository in the following example)
Click on remote
- Open Organizer in Xcode and go to the Repositories tab.
- First click Remote Controls and then Add Remote

- Enter the remote name and location of the remote repository and click create

- Then select your project and open "File" โ "Source Control" โ "Push ..."

- Select a remote repository and wait for it to connect! Look for Create in brackets.

- Now your old project is published on GitHub

source share