Esowes
Esowes

Reputation: 297

Xcode Source Control git locations

This won't be a technical question, just a general knowledge one.
I'm just starting to use Source Control with Xcode 11 and was wondering where the git repositories were actually stored ? It matters to me for safekeeping purposes.
Up until now, I have regularly duplicated my Project Folder before working on changes, keeping my files on my desktop, which is constantly backed up to iCloud.

Are git repos backed up to iCloud in Xcode ?

Thanks

Upvotes: 0

Views: 349

Answers (1)

matt
matt

Reputation: 534885

A git repo is just a folder. For an Xcode project, that folder is inside the the project folder. So wherever and however you back up the project, that is how you back up the repo: whether by Time Machine, iCloud, explicit copying, or whatever.

There is also the very nice ability for a git repo to back itself up by keeping a copy in the cloud, such as at GitHub. But that would be up to you; you can use git perfectly well without doing that.

To put it another way, I like to look at git as doing three things:

  • The world's greatest Undo mechanism.

  • A backup mechanism.

  • A means of allowing multiple programmers to collaborate coherently.

Your situation sounds like you're interested only in the first of those aspects of git, and that's just fine. You can back up the repo when you back up your other project files, and you presumably have no one to collaborate with.

Upvotes: 1

Related Questions