

In such cases, Xcode just indicates the fact that there is a conflict and denies the merge. Unfortunately, creating files is a very common activity when developing a new feature (which is the reason you have created the branch in the first place). The most common source of such conflicts is that you added one or more files to the project in both branches. Merging branches becomes a problem as soon as Git encounters a merge conflict in your project file. Similarly, Xcode does not support advanced Git features like stashing. And while you can uncheck entire files in the commit dialog, it is impossible to stage only some of a file’s changes, something I do frequently in GitX. When you add a new file to the project, it will automatically be staged for the next commit. For example, committing is a one-step process in SVN while Git users first stage the changes they want to commit to the index and then commit from there. Sounds well-intentioned but the underlying models of Subversion and Git are so radically different that I suppose it’s nearly impossible to provide a consistent UI and workflow for both that works well at the same time. In so far as is possible, Xcode provides a consistent user interface and workflow for users of either Subversion or Git. The problems start with this quote from the Xcode 4 User Guide: The Xcode 4 Version Editor is pretty cool. This works mostly well as long as there is no merge conflict in your. Best of all, you can edit the resulting file directly in the merge view if none of the four standard merge options do the right thing. The same interface is used when doing a merge.

It’s definitely one of the best diff implementations I have used. With its Time Machine-like timeline, it lets you compare any two versions in your repository in a very nice and clean diff view. One of the new UI features in Xcode 4 is the version editor, and it is indeed pretty cool. Now, having worked with Xcode 4 for a few months, I am quite disappointed with its Git integration. I had already adopted Git for all my projects at the time and the prospect of having version control integrated into the IDE was exciting. When Apple revealed at last year’s WWDC that Xcode 4 would have native Git support, it was one of the features I looked forward to the most.
