BLACK FRIDAY: Save 50% on all books and bundles! >>

Proper .gitignore use?

Forums > SwiftUI

Hi all,

I have a question about the best gitignore / github setup. I haven't used this file yet for Xcode (I use gitignore at work in Java)

Do we want to push up both the project folder, and the project.xcodeproj folder? Or just one of these?


thanks for any tips -Bill


You want to push both. The project folder contains all the files that make up your project; the .xcodeproj file (which is actually a package, i.e., a folder that macOS treats as a file, which is why it shows up as a folder in github) tells Xcode how to put them all together.


@twostraws  Site AdminHWS+

If you're shipping an app for iOS, macOS, watchOS, or tvOS, you should upload your xcodeproj file and the project directory. If you're building a simple executable using Swift Package Manager, you can skip the xcodeproj and users can make that themselves if they need it. The vast majority of folks are in the first group!


Save 50% in my Black Friday sale.

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

Not logged in

Log in

Link copied to your pasteboard.