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

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?

Example: https://github.com/BillMoriarty/TrackPractice

thanks for any tips -Bill

3      

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.

3      

@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!

4      

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.