Xcode Treasures: Source Code Management

Another update to the Xcode Treasures beta has been released today. This one is all about Source Code Management.

Scm toc

To be honest, this could well have been called The Git Chapter, since Xcode’s protocol-agnostic source control features are dropping support for Subversion, leaving Git as the Highlander-style there-can-only-be-one winner.

And to be even more honest, this chapter more than any other owns up to limitations in Xcode. Our IDE of well-we-didn’t-really-have-a-choice doesn’t offer every Git command, and doesn’t even try to. Some commands, like bisect, would require an entirely different UI to implement, and the hard-core history-rewriting commands like cherry-pick and rebase are apparently above Xcode’s pay grade.

So what’s the point? In practice, a lot of developers do use Xcode’s Git support… in addition to using some other system like the command-line or the GitHub app. Some people use Xcode’s nice UI for doing visual diffs; others do simple commits in Xcode rather than losing their momentum by switching apps. The chapter gets into the features you might decide to pick and choose.

Also, it has one of my editor’s favorite jokes/references in the whole book (it’s either this, or the “duck season / wabbit season” joke back in chapter 6):

Xcode conflict resolution

And, for those of you who end up outside of Xcode, there’s a section on how to resolve conflicts on the command-line with /Applications/Utilities/FileMerge:

Filemerge resolve merge conflict

To top it off, there are even some tips on resolving merge conflicts in project files and storyboards, along with some finger-wagging about better development practices that would have kept hypothetical you from having a storyboard merge conflict in the first place (but, yes, you can make sense of the storyboard XML and resolve a merge conflict by hand if you’re brave… I’ve actually done it myself a few times and I’m not dead yet).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.