Information Technology Reference
In-Depth Information
FIGURE 14.12
Selecting versions using the new time line feature
CAUTION
Version comparisons are for display only; when you view a version in the Version Editor, the file doesn't change in
the main editor. There's no single-click option for reverting a project to a previous commit. You can revert to an
earlier commit manually from the command line using the git revert command, but you can revert individual
files in Xcode only by copying a version from the Version editor, pasting the old code into the main code editor,
and creating a new commit. If the project has multiple files, you must do this for all of them, but you can simplify
this with branches, as described later in this chapter.
Using the Blame view
The Version Editor includes two further views. You can select them using the icons at the bottom right of the
window. The Blame view, shown in Figure 14.13, is primarily used for team development, but if you're working
solo, you can use it to view a list of changes to a file. Each commit is listed at the right of the file in a view that
includes time, date, and author information, and it's linked to one or more lines of source at the left. If you se-
lect a commit with one of the small gray arrows, it's loaded into the left window of the Version Editor, and the
preceding commit is loaded into the right.
FIGURE 14.13
Using the Blame view to list changes to a single file, with the name of the author of each change
Search WWH ::




Custom Search