Git: Comparing File Revisions

The IDE's graphical Diff Viewer enables you to compare revisions of a file side by side using color coding to emphasize the differences between the files being compared.

To access the Diff Viewer, select a version-controlled file or folder (e.g. from the Projects, Files or Favorites window) and choose either Git > Diff from the right-click menu or Team > Git > Diff from the main menu.

The following table lists the Git commands available in the toolbar of the Diff Viewer:

Icon Name Function
Changes between HEAD and Working Tree icon Changes between HEAD and Working Tree Displays a list of files that are either already staged or only modified/created and not staged yet.
Changes between HEAD and Index icon Changes between HEAD and Index Displays a list of files that are staged.
Changes between Index and Working Tree icon Changes between Index and Working Tree Displays files that have differences between their staged and working tree states.
Go to Next Difference icon Go to Next Difference Displays next difference in the file.
Go to Previous Difference icon Go to Previous Difference Displays previous difference in the file.
Refresh Statuses icon Refresh Statuses Refreshes the status of the selected files and folders. Files displayed in the Versioning window can be refreshed to reflect any changes that may have been made externally.
Revert Modifications icon Revert Modifications Displays the Revert Modifications dialog box.
Commit Changes icon Commit Changes Displays the Commit dialog box.

The Diff Viewer provides the following UI components:

Blue (       ) Indicates lines that have been changed since the earlier revision.
Green (       ) Indicates lines that have been added since the earlier revision.
Red (       ) Indicates lines that have been removed since the earlier revision.

The following icons allow you to make changes directly to your local working copy:

Replace ( replace icon ) Inserts the highlighted text into your Working Tree copy.
Move All ( move all icon ) Reverts the whole local Working Tree copy.
Remove  ( remove icon ) Removes the highlighted text from the local Working Tree copy.

Legal Notices