I want to use Git for versioning my playgrounds, but I am not sure which files should be ignored and which ones I should commit.
Currently I use following .gitignore
file for playgrounds:
# Xcode user data
xcuserdata
What else should be there?
From the official github gitignore for Swift
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 terminalcd
into your project root folder (the one with the .xcodeproj file for a normal project) and run the following command:Or alternatively get it from the GitHub source:
You can edit the file to make changes if you need to. I just use the defaults.