Does anyone have a good pre-rolled gitignore file for iPhone development using Xcode and PhoneGap?
Currently I'm using:
.idea
.DS_Store
*.swp
*~.nib
build/
adhoc/
.xcodeproj/ !*.xcodeproj/project.pbxproj
*.mode1v3
*.mode2v3
build/
xcuserdata
But I'm not sure this is ideal. For example, updating Phonegap kinda messes up a lot of things. Also, if another developer just builds the project using Xcode, then git will pick up some changes.
Oddly enough, Xcode does not feature on this list: https://github.com/github/gitignore
I ended up with this .gitignore config, which worked fine:
.idea
.DS_Store
*.swp
*~.nib
build/
adhoc/
.xcodeproj/ !*.xcodeproj/project.pbxproj
*.mode1v3
*.mode2v3
build/
xcuserdata
Here's an updated version of a sample .gitignore for Xcode iOS and OSX projects I made several years ago, which excludes a variety of things from the archive which are not necessary to archive, and which you might not encounter often or notice when they slip through. It's intended to be reasonably comprehensive. It includes temp files from various editors and user preference files from Xcode and its ancestors. (You might not encounter these often, but they show up now and then, in projects with deeper roots, or if you work with a new team member who likes a different editor.)
# Mac OS X Finder and whatnot
.DS_Store
.Trashes
# Sparkle distribution Private Key
dsa_priv.pem
# Xcode (and ancestors) per-user config
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
*.pbxuser
# Whitelist the Xcode defaults
!default.mode1
!default.mode1v3
!default.mode2v3
!default.perspective
!default.perspectivev3
!default.pbxuser
# Xcode 4 - Deprecated classes
*.moved-aside
# Xcode gcc
*.hmap
#JetBrains AppCode
.idea/
# Generated files
VersionX-revision.h
# build products
xcuserdata/
DerivedData/
build/
adhoc/
*.[oa]
# CocoaPods
Pods/
# Other source repository archive directories
.hg
.svn
CVS
# automatic backup files
*~.nib
*.swp
*.lock
*~
*(Autosaved).rtfd/
Backup[ ]of[ ]*.pages/
Backup[ ]of[ ]*.key/
Backup[ ]of[ ]*.numbers/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With