UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Xcode and GitHub

Forums > 100 Days of SwiftUI

There are resources out there about about how to connect a single Xcode project to a single GitHub repo. In order to not pollute my GitHub repo, a nicer structure that I've seen is creating a repo on GitHub called e.g. 100-days-of-swiftui, and inside that repo would be a number of Xcode projects (e.g. WeSplit), or, just as good, inside the repo is a series of folders (e.g. Day30) and inside each of those folders is an Xcode project. Either way. I have not seen good info on how to use Xcode's git and GitHub support to pull this off. (I could do all this with git on the command line, which I guess will do, but I suspect that's not the "right way".) Suggestions?

2      

From my understanding Xcode uses git on a per project base. My guess is you would need to this manually and set up the repo on the root folder.

What you could try is creating a workspace (File -> New -> Workspace). In this you can create multiple projects (from my understanding) but I don't know how the git repos are handled in a workspace. I have no experience with them.

2      

You can have a root folder repo with each project as a subfolder. Just create a new repo (using the website or whatever) and clone it to your machine. Then when you create your individual projects, you can store them inside that root folder and push them to the root repo.

3      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.