Viewing Changes History for a File or Selection
CLion allows you to review changes made to files or even fragments of source code. The Show History and the Show History for Selection commands are available from the main VCS menu and from the context menu of files.
The change history for a selection of code is displayed in a separate window, in the form of the differences viewer.
In this topic:
Viewing the History for a File
Do one of the following:
- Open a file in the editor. Then, on the main menu or on the context menu of the editor tab, choose <VCS> | Show History.
- In the Project tool window, right-click a file and choose <VCS> | Show History from the context menu.
The History tab for the selected file appears in the Version Control tool window, the name of the file is shown on the title bar of the tab.
Click the column headers to sort changes.
You can use the toolbar buttons to compare the selected revision with the local version, compare classes from the selected revision, checkout the selected revision from your VCS, annotate the selected revision, etc.
To review other files updated in the same revision, select the required revision and choose Show All Affected Files from the context menu. The Paths Affected in Revision dialog will open showing the list off all files modified within the selected revision.
Viewing the History for a Selection
- In the editor, select a fragment of the source code.
- Choose <VCS> | Show History for Selection from the main menu, or on the context menu of the selection.
The history for the selected fragment will open in a separate window.