Step 6: Pulling from your remote
To bring your local working copy in sync with the changes that your coding buddies have made on the remote, select File – Source Control – Pull. A similar window will prompt you to select the remote from which you want to pull:
Click choose, Xcode will go a fetch the changes and bring your working copy up to speed. As I said before, if there are unresloved conflicts then this will be flagged at that point (but we’re not going to cover this here).
Step 7: Checking out a working copy (for your collaborators)
Your local system is sorted and ready for work – online and offline. But how about your collaborators? They still need a working copy of your code. Well, they all need to checkout (or pull) an initial working copy from your remote fist before they can start.
They would do that by heading over to the Xcode Repositories, and at the bottom left hand corner there’s a tiny plus sign. Click that and see the following window appear:
Your buddies can either choose to Add a Repository, or to Checkout/Clone a Reporisitory. The result is pretty much the same, however the latter will check it out and save it on the local system in one fair swoop. Select it to bring up a window asking for the location of the remote. In our example that was
Xcode will let you know if it can reach the host or if authentication is required and prompt for a password (our example URL is not working of course… you should see either a yellow or a green dot there).
Next Xcode will ask your buddy where he wants to save the project on his local disk and open the project. Now they have both a local and a remote repo and can commit, push and pull to their hearts’ content.
Just to summarize: your collaborators will need
- the URL to your remore repo
- and a set of SSH credentials to connect