What should I include in the .gitignore file for Swift playgrounds?
Whether it is a normal project or playgrounds, it is convenient and useful to use one of the standard .gitignore
files for Swift. From the terminal cd
into your project root folder (the one with the .xcodeproj file for a normal project) and run the following command:
curl -o .gitignore https://www.gitignore.io/api/swift
Or alternatively get it from the GitHub source:
curl -o .gitignore https://raw.githubusercontent.com/github/gitignore/master/Swift.gitignore
You can edit the file to make changes if you need to. I just use the defaults.