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

前端 未结 3 848
礼貌的吻别
礼貌的吻别 2020-12-04 06:26

The Git integration in Xcode 4 is very welcome however it seems to be a bit flaky when it comes to dealing with remote repositories. For clarity I\'m using OS X version 10.6

3条回答
  •  暖寄归人
    2020-12-04 06:52

    Xcode 6.2 (and possibly 6.x) changed things around. There no longer is a Repositories tab in the Organizer. Here's how to do it with the newer Xcodes.

    To add a project with a local git repository to GitHub, this is what you do:

    1. Go to the Source Control menu, elect your project and select Configure:

    enter image description here

    1. You'll see:

    enter image description here

    1. Select the Remotes tab, and press the "+" in the lower left corner. Select Add Remote.

    enter image description here

    1. Type in a name for the remote repository, and type in the URL for your remote repository. Make sure you've created this remote repository already, and if on GitHub, make are you specify that this is an existing project, and not a new one.

    enter image description here

    1. You're almost done. Go to the Source Control menu and select Push. You will then see the name of the repo you used in the last step, something like "simplest/master"; press the Push button.

    Done.

提交回复
热议问题