Information Technology Reference
In-Depth Information
10. To switch between branches, select the project folder under Branches and click the Switch Branch
icon near the bottom right.
A dialog box with a menu of branches appears, as shown in Figure 14.16. When you select a branch here,
the code for the branch appears in Xcode's main editor.
Figure 14.16
Although it's not obvious from this dialog box, selecting a branch loads its files into the main editor.
CAUTION
Note that selecting branches in the Branches folder doesn't load them into the editor. You must click the Switch
Branches icon to change branches.
Merging branches
To merge branches, begin by using the Organizer to switch to the branch you want to use as a merge destina-
tion. This is often, but not always, the original Master branch.
Next, pick a branch as a merge source. Select File⇒Source Control⇒Merge, and choose a branch from the menu
in the dialog. The code in this branch is merged into the destination branch.
After the merge, this branch remains unchanged—the changes happen only in the destination.
Xcode displays the Version Editor, as shown in Figure 14.17. A preview of the merged code is shown at the
right.
Search WWH ::




Custom Search