Xcode 5: Version Control Changes
This post covers the changes in version control support in Xcode 5. If you need more detailed information on Xcode’s version control features, read the version control chapter of my Xcode book, which you can download at the book’s site.
Version Control Features Removed from Organizer #
If you open the Organizer in Xcode 5, you’ll notice there is no Repositories button at the top of the window. Where did the version control features go?
Use the Source Control Menu to Perform Most Version Control Tasks #
Xcode 5 adds a Source Control menu to the menu bar. The Source Control menu has menu items to perform most version control tasks, including committing changes, creating branches, switching branches, merging, pushing, pulling, and checking the version control history of your project.
Commit and Push #
Xcode 5 allows you to push your changes to a remote repository when you commit. Do a commit, and a sheet opens for you to enter a commit message. In the lower left corner of the sheet is a Push to remote: checkbox. Select that checkbox, choose a remote branch, and click the Commit button to push your changes to a remote repository.
Use Xcode’s Accounts Preferences to Add Existing Repositories #
Xcode’s Accounts preferences show your repositories. Click the + button to add an existing repository.
Accessing the Version Editor’s Blame and Log Views #
Xcode 5 removed the buttons at the bottom of the version editor to switch to the blame and log views. The version editor button in the toolbar has a menu to switch to the blame or log view. You can also switch views by choosing View > Version Editor and choosing the appropriate submenu.
Disabling Xcode’s Source Control #
Those of you who use the command line or a third-party app for version control will appreciate this feature. Xcode 5 allows you to disable its source control tracking. Open Xcode’s Source Control preferences and deselect the Enable Source Control checkbox.