I’m developing iphone apps with a friends. We are sharing the code with git but we are facing some problems for instance when one add some new file (git add, git commit, git push) the other one can not see them in xcode and needs to copy them from filesystem.
What are the file to share on top of the source code ?
What are the file not to share (I’m thinking of files linked to xcodeproj, xcuserdata, …) ?
Your
.gitignorefile should look somewhat like this:Everything else contained in your project folder (sources, resources, etc…) can and should be shared. So yes, do share the
xxx.xcodeproj– or evenxxx.xcworkspace– folder or else your coworkers won’t get updated versions of your project, possibly including new files to build.The drafted .gitignore will prevent sharing of the .DS_Store, build-results, Xcode 3.x user-specific workspace settings and the Xcode 4.x user-specific workspace settings.
As mentioned by Tamas, you may actually just copy the mercurial pattern from this answer and enhance it by
xcuserdata/as drafted above to update it towards an Xcode 4.x compatible pattern.