DataGrip 2020.1 Help

Shelve Changes dialog

Use this dialog to shelve the selected files or changelists.

Modified files pane

This section contains a list of files that have been modified since the last commit. All files in the list are selected by default. Deselect the files that you do not want to shelve.

Modified files pane toolbar

ItemTooltip and ShortcutDescription
the Show Diff buttonShow Differences
Ctrl+D
Open the Differences dialog that highlights the differences between your local working copy of the selected file and its repository version.
the Revert iconRevert Revert all changes made to the local working copy of the selected files.
the Refresh button Refresh Changes
Ctrl+F5
Click this button to reload the Changed files tree view so it is up-to-date.
icons.actions.groupBy.png Group By Choose how you want to group the modified files - by directory or module
the Expand All button
the Collapse All button
Expand or collapse all nodes
Ctrl+NumPad +
Ctrl+NumPad -
Click these buttons to expand or collapse all nodes in the directory tree. These buttons are not available in flat view.
Changelist N/A

From this list, select the changelist that contains the modified files to be shelved. The active changelist is selected by default.

The summary under the modified files pane shows statistics on the currently selected changelist, such as the number of modified, new and deleted files. This area also shows how many files of each type are shown, and how many of them will be shelved.

Commit Message pane

In this area, enter a string that will be used as the shelf name. When you unshelve your changes, a new changelist with the same name will be created in the Local Changes view . If you leave this field empty, the shelf name will be generated using the following pattern: <number of files in the shelf>, <date and time when the shelf was created>:

Before Submit / Before Commit section

Use the controls in this area to define which additional actions you want DataGrip to perform before shelving the selected files.

These controls are available for the following version control systems:

  • Git

  • Subversion

  • Perforce

ItemDescription
Reformat code Perform code formatting according to the Project Code Style settings.
Rearrange code Rearrange your code according to the arrangement rules preferences.
Optimize imports Remove redundant import statements.
Perform code analysis Run code inspection on the files you are about to commit/shelve.
Check TODO (<filter name>) Review the TODO items matching the specified filter. Click Configure to choose an existing TODO filter, or open the TODO settings page and define a new filter to be applied.
Cleanup Automatically apply the current inspection profile to the files you are going to commit/shelve.

After Submit / After Commit section

Use the controls in this area to define which additional actions you want DataGrip to perform after committing the selected files.

ItemDescriptionAvailable for
Run tool From this list, select the external tool that you want DataGrip to launch after the selected changes have been committed. You can select a tool from the list, or click the Browse button the Browse button and configure an external tool in the External Tools dialog that opens. All VCSs
Upload files to

From this list, select the server access configuration or a server group to use for uploading the committed files to a local or remote host, a mounted disk, or a directory.

  • To suppress uploading, choose None.

  • To add a server configuration to the list, click the Browse button and fill in the required fields in the Add Server dialog that opens.

The list is only available if the FTP/SFTP Connectivity plugin is enabled.

All VCSs
Always use selected server or group of servers

Select this checkbox to always upload files to the selected server or a server group .

The checkbox is only available if the FTP/SFTP Connectivity plugin is enabled.

All VCSs

Diff pane

The Diff pane is hidden by default. To unfold it, click the arrow button Unfold button next to the pane title.

In this pane you can explore the differences between the base repository version of the selected file, and the version you are about to commit.

Diff pane toolbar

ItemTooltip and ShortcutDescription
the Previous Difference button/the Next Difference buttonPrevious Difference / Next Difference Shift+F7 F7

Use these buttons to jump to the next/previous difference.

When the last/first difference is reached, DataGrip suggests to click the arrow buttons F7/Shift+F7 once more and compare other files, depending on the Go to the next file after reaching last change option in the Differences Viewer settings.

This behavior is supported only when the Differences Viewer is invoked from the Version Control tool window Alt+9.

the Edit button Jump to Source
F4
Click this button to open the selected file in the active pane in the editor. The caret will be placed in the same position as in the Differences Viewer.
Back
Forward
Compare Previous/Next File
Alt+LeftAlt+Right

Click these buttons to compare the local copy of the previous/next file with its update from the server.

Viewer type

Use this list to choose a viewer type. The side-by-side viewer has two panels; the unified viewer has one panel only.

Both types of viewers enable you to

  • Edit code. Note that one can change text only in the right-hand part of the default viewer, or, in case of the unified viewer, in the lower ("after") line, that is in your local version of the file.

  • Perform the Apply/Append/Revert actions.

Whitespace

Use this list to define how the differences viewer should treat whitespaces.

  • Do not ignore: white spaces are important, and all differences are highlighted. This option is selected by default.

  • Trim whitespaces: ("\t", " ") , if they appear in the end and in the beginning of a line.

    • If two lines differ in trailing whitespaces only, these lines are considered equal.

    • If two lines are different, such trailing whitespaces are not highlighted in the By word mode.

  • Ignore whitespaces: white spaces are not important, regardless of their location in the source code.

  • Ignore whitespaces and empty lines: the following entities are ignored:

    • all whitespaces (as in the 'Ignore whitespaces' option)

    • all added or removed lines consisting of whitespaces only

    • all changes consisting of splitting or joining lines without changes to non-whitespace parts.
      For example, changing a b c to a \n b c is not highlighted in this mode.

Highlighting mode

Select the way differences granularity is highlighted.

The available options are:

  • Highlight words: the modified words are highlighted

  • Highlight lines: the modified lines are highlighted

  • Highlight split changes: if this option is selected, big changes are split into smaller 'atomic' changes.
    For example, A \n B vs. A X \n B X will be treated as two changes instead of one.

  • Highlight symbols: the modified symbols will be highlighted

  • Do not highlight: if this option is selected, the differences are not highlighted at all. This option is intended for significantly modified files, where highlighting only introduces additional difficulties.

the Collapse All buttonCollapse unchanged fragmentsClick this button to collapse all unchanged fragments in both files. The amount of non-collapsible unchanged lines is configurable in the Diff & Merge settings page.
Synchronize scrolling Synchronize scrolling Scroll both differences panes simultaneously. If this button is released, each pane can be scrolled independently.
the Disable Editing icon Disable editing Enable editing of the local copy of the selected file, which is disabled by default. When editing is enabled, you can make last-minute changes to the modified file before committing it.
the Gear icon Editor settings Open a list of available options. Select or clear these options to show or hide line numbers, indentation guides, white spaces, and soft wraps.
the Help buttonHelp
F1
Click this button to show the corresponding help page.

Note that the options listed above are available for text files only. DataGrip cannot compare binary files, so most commands will be unavailable for them.

Last modified: 29 June 2020