1)
The easiest answer is that mine looks like this:
# Xcode
.DS_Store
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
# Pods - for those of you who use CocoaPods
Pods
which I believe is the same .gitignore that GitHub sets up with all their repositories by default.
2)
Another answer is that there's a website called "gitignore.io" , which generates the files based on the .gitignore templates from https://github.com/github/gitignore.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…