Xcode 4, git and merge the project file!

I have a problem! We are working on an iPhone application and use git. The problem is that if someone changes something in the project (adds a file, etc.), and I'm trying to extract this change, I need to merge it. But merging is not painless, I often get a corrupt project file and have to spend quite a lot of time to fix it.

Does anyone have a solution to this problem?

(Sorry for my crappy English)

+3
source share
2 answers

Project files are known for conflicting. I would include reerere (meaning "Reuse Recorded Resolution") so that if you need to repeat conflict resolution, you can at least solve your decisions from the previous time you made them. A great rerere entry is here: http://progit.org/2010/03/08/rerere.html

If you have a penchant, it's best to take a look at this - this is an extended topic for writing a custom merge driver. See โ€œDefining a custom merge driverโ€ at http://git-scm.com/docs/gitattributes

Hope this helps.

+4
source

Three important steps:

  • The reason git ignores everything in the project file, except for project.pbxproj in the .xcodeproj folder - use .gitignore for this.
  • , .pbxproj, . , , , , Xcode , "" .
  • , " โ†’ โ†’ YOURS" " โ†’ โ†’ THEIRS", . , filemerge, , .

,

  • , - , , , .
  • .
+1

All Articles