git rebase corrupts Xcode projects
git rebase corrupts Xcode projects
- Subject: git rebase corrupts Xcode projects
- From: Doug Hill <email@hidden>
- Date: Thu, 27 Sep 2012 14:23:04 -0700
I'm seeing problems with using git rebase on our source code repositories that have Xcode projects.
The problems happen when I rebase a git branch that has an Xcode project, and there are conflicts. It can be a nightmare to figure out how to resolve. I generally try to pick out the various changes between the two versions of the files in the diff tool, and hope that works. However, it generally doesn't.
One of the biggest problems I see is something like this:
• git rebase reports a conflict in my Xcode project file
• Looking at the changes in my merge tool, it reports that the conflicted line in the project has no actual conflict. It will just show that there was an update in one of the revisions but no conflicting change in the other revision. That is, it appears to just be a new line in one revision that needs to be added to the other. Often it's a new file that is added to one revision in the other branch that needs to be added to the current branch.
• I say "whatever" and just choose the change from the first revision and finish up the rebase.
• When I open the project Xcode, the new entry appears in the file hierarchy.
• However, the file doesn't have a target setting, won't compile, link, or be copied into my final application.
So, essentially, the rebase causes my Xcode project to be corrupted. I have to manually go to those affected files and set the proper target association. This is problematic since there may be many files that are affected and I don't always know which ones to fix. I then usually don't fix every file and my project is broken. This is especially problematic if the affected file is a resource (e.g. xib) since I won't get a build-time error and the app will usually fail when the resource needs to be loaded. It just aint there.
Hence, I generally hate doing rebases as they corrupt my projects.
Maybe I'm doing something wrong. I have a couple of questions about this:
1. Is there a way to do this rebase/merge and keep the proper target associations?
2. If not, is there a way to search an Xcode project for files that have no target association so I can at least find out what file settings have been corrupted?
FYI, I'm using:
• Xcode 4.4.1
• iOS project.
• git version 1.7.9.6 (Apple Git-31.1)
• git rebase <branchname>
(no other parameters)
• Merge tool is Araxis Merge (merge.tool=araxis)
(although I get the same problems with FileMerge aka opendiff)
Thanks for any info.
Doug Hill
Schematic Labs, Inc.
http://soundtracking.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden