Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

should I commit .xcodeproj file in SVN?

Tags:

xcode

svn

Should I commit the project file (.xcodeproj)? When I commit this file from one system and update it on a second system, the project gets corrupted and Xcode won't open it.

Is this expected behavior, or am I maybe doing something wrong? Here is my list of ignored files:

*.o,*.lo,*.la,*.al,.libs,*.so,*.so.[0-9]*,*.a,*.pyc,*.pyo,*.rej,*~,#*#,.#*,.*.swp,.DS_Store,*.pbxuser,*.perspective,*.perspectivev3,*.project.xcworkspace,*.xcuserdata,*.mode1v3,*.mode2v3,build/,build,/build/

Should I add something to this list? Should I forget the SVN and switch to GIT?

I am using Cornerstone as SVN client and using Xcode 3.2.5

Please help; I am stuck!

like image 477
Saurabh Avatar asked May 25 '11 05:05

Saurabh


People also ask

Should .xcodeproj be in git?

xcodeproj file, yes, you should include it in your repository.

What is Xcodeproj file?

An Xcode project is a repository for all the files, resources, and information required to build one or more software products. A project contains all the elements used to build your products and maintains the relationships between those elements. It contains one or more targets, which specify how to build products.


1 Answers

do commit and track it. specifically, there are a few bits in there which you want - the most important is project.pbxproj. it looks like you have already ignored the user-specific pieces (which is good).

problem is, it will conflict often in distributed environments. break your projects and/or their definitions into smaller pieces to avoid this risk. the project file is a text format - it will merge without issue in some cases.

i do not track these:

*.xcbkptlist
*.xcuserstate

but you'll want to track some of the scheme and workspace files, new in Xc4. again, don't bother tracking the user defined bits, unless you really like them to be tracked, and you are the only person committing.

another thing i recommend is to build to a central location which lies outside of your versioned source directories -- no build/ directories among the sources, even if they are ignored.

like image 65
justin Avatar answered Sep 20 '22 17:09

justin