IntelliJ IDEA

Local History & Diff Tool

Local History
Advanced Diff Tool

Local History

IntelliJ IDEA tracks any changes you make to your source files or any other file, as well as the changes that affect a directory’s content and structure. This feature will protect you from any accidental losses or modifications, even if made by other applications outside IntelliJ IDEA. Setting version labels is also available. Any time you can inspect the history of either a particular file or directory and rollback to any of its previous versions.

Live Demo

File history

File history
The File History view is organized in such a convenient way, that the two parallel panes show differences between the current version of a file and any arbitrary version from the history, while the lower pane allows users to select file versions for comparison, as well as reflects the actions performed while changing the file (e.g. applying refactorings).

Selection history

Selection history
If you have a rather large file, and you are interested in changes made in its particular part, you no longer need to review the entire file history and scroll to the necessary point for each revision. Just select the code block of interest in the Editor and call the Show History for Selection command.

Directory history

Directory history
This view reflects directory-related changes such as creating, moving, deleting files and sub-directories, as well as file modifications. The lower pane allows users to select a directory version for comparison with a current one, as well as highlights all actions performed.

Ability to set version labels

This feature will help manage the versioning of your files and project as a whole. It can be used for marking the most consistent state(s) of the project, in order to easier locate your changes later.

Advanced Diff Tool

Compare two arbitrary files

This new feature allows you to easily compare two arbitrary files selected in the Project View or Commander. Calling this command will open an advanced visual Diff window, showing diff statistics and highlighting differences with various color.

Compare project files opened by two team members

If you and your colleague work on the same file for some time, you can make sure that your changes don't cause any conflict after merge. With the help of new collaboration feature — bundled IDEtalk plugin — you can view the differences between the two versions of files which now exist on different computers.

Read more about team collaboration ».

Compare current selection with the clipboard

In addition to comparing two files, you are also able to call the Diff window for comparing the current selection in the Editor with the most recent record in the clipboard.

Full-featured editor provided for the base file or revision

The Current version panel of the Diff view represents a full-featured editor with syntax highlighting, code completion, intention actions, and error/warning detection.

Moving separate changes from one version to another

Moving changes
You can move changes from one version to another, simply by clicking the icon located on a gutter area, next to a particular change.

Option to ignore whitespaces in Diff view

Ignore whitespaces
Using the drop-down box on the Diff view toolbar, you can customize the Diff tool to either consider or ignore white space characters when they appear as differences.

to the top