3

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, ...) ?

manojlds
  • 290,304
  • 63
  • 469
  • 417
Luc
  • 16,604
  • 34
  • 121
  • 183
  • 1
    Possibly related (although not exact duplicate): http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects – Tamás Dec 22 '11 at 20:55

1 Answers1

3

Your .gitignore file should look somewhat like this:

.DS_Store
build/
*.pbxuser
xcuserdata/

Everything else contained in your project folder (sources, resources, etc...) can and should be shared. So yes, do share the xxx.xcodeproj- or even xxx.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.

Community
  • 1
  • 1
Till
  • 27,559
  • 13
  • 88
  • 122