Which files are better to ignore in git for an Xcode 4(.3.2)? This older question addresses the same issue but I find my structure to be different so I assume it’s about an older version of Xcode.
Here are git ignore files for basicly every language including Xcode : Github – git ignore
For me it is working like a charm. Here is the content of the Objective-C.gitignore
# Xcode build/* *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 *.xcworkspace !default.xcworkspace xcuserdata profile *.moved-aside DerivedData
This is what we use:
#xcode Noise build/* *.pbxuser *.mode2v3 *.mode1v3 *.xcworkspace xcuserdata # OSX Noise .DS_Store profile *~ *.lock *.DS_Store *.swp *.out
Existing answers are good. I just want to leave a note for people who are using
CocoaPods to manage libraries. Besides the
xcworkspace generated by CocoaPods, you should also ignore
every developer should do
pod install on their own machine separately. otherwise, they may face many environment issues.
I’ve been using the solution from the question you linked with a few changes. I think it has a really nice solution for ignoring unnecessary project files
#OS junk files [Tt]humbs.db *.DS_Store *.bak* #Xcode files #This ignores everything inside a *.xcodeproj except the project.pbxproj *.xcodeproj/ !*.xcodeproj/project.pbxproj *.log xcuserdata #Project files [Bb]uild/ #Version control files .svn *.orig
I normally ignore the following
And some hidden files like