Re: Another Odd Question

Quincey Morris

On Feb 27, 2020, at 18:43 , Charles Phillips <phillipstriples@...> wrote:

I am trying to connect the version on XCode to an existing repository but the Add an existing remote refuses to cooperate.

I see the "Remote Name" and "Location" entries and have tried to put in the names of the repositories but the XCode does not connect. 

It’s a bit hard to tell from your brief description, but that’s not how it works. A remote is a reference in an existing repository to another copy of the same repository. If you already have a local copy of the repository on your Mac Mini, then adding another remote is probably not the right thing to do — it likely already has the remote reference.

Ideally, assuming that you pushed all your changes from the MacBook to GitHub, then you should just discard whatever you have locally on the Mac Mini and clone a new copy of the repository there:

— Go to GitHub, click on the “Clone or Download” button, and copy the git URL that’s shown there. (Don’t actually download anything.)

— Then in Xcode, go to Source Control -> Clone, and paste the git URL.

— Complete the cloning process over the next couple of dialogs, then you should be good to go.

If you have modified files locally that you never pushed to GitHub, the easiest approach is to set them aside, follow the regular clone procedure (above), then replace files that need updating from the copies you kept.

It really shouldn’t be any harder than that, unless for some reason your local or remote repositories are broken and need to be recovered. I suspect that’s not the case.

Join to automatically receive all group messages.