IntelliJ IDEA 14.1.1 Help

Commit Changes Dialog

VCS | Commit Changes
VCS | Show Changes View - Local - Context menu of a file or change list - Commit Changes
View | Tool Windows | Changes - Local - Context menu of a file or change list - Commit Changes

Use this dialog box to commit (check in) changes from the selected change list to the repository and, optionally, to create a patch file.

The options available in this dialog depend on the version control system you are using.


Item Tooltip and Shortcut Description Available in
icon_showDiff Show Differences
Click this button to open the Differences dialog box that points at the inconsistencies between your local working copy of the selected file and the file in the repository. All VCSs
moveChangelistItems Move to Another Changelist
Click this button to add the selected file(s) to another changelist. The Move to Another Changelist dialog box opens where you can select an existing changelist or create a new one. All VCSs
refresh Refresh Changes
Click this button to reload the Changed files tree view so it is up-to-date. All VCSs
rollbackSVN Rollback Click this button to revert all changes made to the local working copy of the selected file(s). All VCSs
edit Jump to source
Click this button to open the source code of the selected file in the editor. All VCSs
vcsToolbarRevertUnchangedIcon Revert Unchanged Files Click this button to revert the files that have not been modified locally. Subversion
vcsToolbarGroupByDirIcon Group by Directory
Click this button to toggle between the flat view and the directory tree view. All VCSs
Expand or collapse all nodes
Ctrl+NumPad -
Click these buttons to expand or collapse all nodes in the directory tree. These buttons are not available in flat view. All VCSs


Item Description Available in
Changed files This tree view displays the list of modified files. Select the check boxes next to the files that you want to check in. All VCSs
Commit Message In this text box, describe the changes to be checked in. This comment will be also used as the name of the patch file, if you decide to create a patch. As you type, IntelliJ IDEA checks the spelling and highlights words in question.

This functionality is available if the Spelling code inspection is enabled.

All VCSs
Change list From this drop-down list, select the change list that contains the modified files to be checked in or included in the patch. By default, the active change list is suggested. All VCSs
Summary This section displays summary statistics on the currently selected change list, such as the number of modified, new, and deleted files. The area also shows how many files of each type are shown and how many of them will be committed. All VCSs
Author Use this drop-down list to specify the person who created the changes to be checked in. Git
Amend Commit Select this check box to replace a previous commit with the current changes. Git, Mercurial
Keep files locked Select this check box to keep the files locked after they are checked in. Subversion

This area is available only if you select the Enable Perforce Jobs Support check box on the Perforce page of the Settings dialog box.

Use the controls in this area to search forPerforce jobs, link jobs to the selected changelist, and detach currently linked jobs.

  • Unlink selected jobs button delete - click this button to detach the selected job from the changelist.
  • Edit associated jobs button icon_openLocalVersion - click this button to open the Edit Jobs Linked to Changelist dialog box where you can search for available jobs, view their details, and link the desired job to the changelist.
  • Find and link job matching the pattern button add - click this button to start quick search for the job that matches the pattern specified in the text box and attach the job to the changelist.
    In the text box, specify the exact name of the desired job or a search pattern according to the Perforce jobs syntax rules.

The list box in the bottom of the area displays the jobs that are currently attached to the changelist.

Before Submit/
Before Commit
Use this area to define which additional activities you want IntelliJ IDEA to perform before checking in the selected files. The available options are: CVS
After Submit/
After Commit
Use this area to define which additional activities you want IntelliJ IDEA to perform after checking in the selected files. The available options are:
  • Run tool: in this drop-down box, appoint the external tool to launch after the selected changes are checked in. Choose the one of the available third-party tools or click the Browse button browseButton.png and configure integration with the required tool in the External Tools dialog box that opens.
  • Upload files to: in this drop-down list, specify the server access configuration to use for uploading the committed files to a local or remote host, a mounted disk, or a directory. To suppress uploading, choose None.
  • Always use selected server: select this check box to have IntelliJ IDEA by default upload files according to the server access configuration specified in the Upload files to: drop-down list.

    The drop-down list and the check box are only available if the Remote Hosts Access plugin is enabled.

  • Tag committed files: select this check box to have a tag assigned to the checked in files. In the text box, type the name of the tag. To have a previously assigned tag replaced with the new one, select the Override existing tags check box.

    This option is only available for CVS.

  • Auto-update after commit: select this check box to have your project automatically updated after the commit is completed. Enabling this option will help to prevent your working copy against mixed-revision state.

    The mixed-revision state of a working copy may affect the Move and Rename refactoring applied to folders so items in revisions different from the moved subtree root will be tracked separately, which can be confusing.

    When the Auto-update after commit is enabled:

    • Merge will fail with an error if the merge target is a mixed-revision working copy.
    • Your own changes will never cause a 409 conflict.

    This option is only available for Subversion integration.

All VCSs
Details The pane is by default hidden, to unfold it click the arrow icon next to the pane title. In this pane, explore the differences between the base repository version of the file selected in the Changed Files list and the version to be checked in.

The pane consists of two areas:

  • The affected code as it was in the base revision.
  • The affected code as it is after the change is introduced.

In each area, IntelliJ IDEA numbers both changes and the lines involved in them.

To close the pane, click the Preview Diff button previewUsages once more.

Item Tooltip and Shortcut Description
arrowDown arrowUp F7
Use these buttons to jump to the next/previous difference.

When the last/first difference is hit, IntelliJ IDEA suggests to click the arrow buttons F7/Shift+F7 once more and compare other files, depending on the check box in the Diff page.

This behavior is available only when the Differences Viewer is invoked from the Version Control tool window.

Compare Previous/Next File
Click these buttons to compare the local copy of the previous/next file with its update from the server.
icon_show_paths Go To Changed File Ctrl+N Click this button to display the path to the compared file.
edit Jump to Source
Click this button to open the file in the active pane in the editor. The caret will be placed in the same position as in the Differences Viewer.
Type of viewer
Use this drop-down list to choose the desired viewer type. The default viewer has two panels; One-side viewer has one panel only.
Use this drop-down list to define how the differences viewer should treat white spaces in the text.
  • Do not ignore: white spaces are important, and the all the differences are highlighted. This option is selected by default.
  • Trim whitespaces: Ignore the 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 mode By word.
  • 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 the whitespaces (as in the option 'Ignore whitespaces')
    • all the added or removed lines consisting of the whitespaces only
    • all the changes consisting of splitting or joining lines without changes to the 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.
Possible options are:
  • By word: changed words are highlighted
  • By line: changed lines are highlighted
  • By word in chunks: if this option is selected, the 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.
  • No highlighting: 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.
collapseAll Collapse unchanged fragments Click this button to collapse all unchanged fragments of both files. The amount of non-collapsible unchanged lines is configurable in the page Diff.
sync_scrolling Synchronize scrolling Click this button to simultaneously scroll both differences panes; if this button is released, each of the panes can be scrolled independently.
cogwheel_blue Editor settings Click this button to reveal the drop-down list of available check commands. Select or clear these check commands to show or hide line numbers, indentation guides, white spaces, and soft wraps.
external_tool Show diff in external tool Click this button to invoke an external differences viewer, specified in the External Diff Tools page.

This button only appears on the toolbar, when the check box Use external diff tool is selected in the External Diff Tools page.

help Help
Click this button to show reference page.
Ctrl+Tab Use this keyboard shortcut to switch between the panes of the Differences viewer. The active pane has the cursor.
icon_InsertReplace icon_InsertReplace2 Use these chevron buttons to apply differences between panes.

The chevron buttons can change their behavior:

  • Click icon_InsertReplaceicon_InsertReplace2 to apply changes. This behavior is the default one.
  • Press Ctrl to change icon_InsertReplaceicon_InsertReplace2 to arrowRightDown or arrowLeftDown and append changes.
  • Press Shift to change icon_InsertReplaceicon_InsertReplace2 to close1 and revert changes.
    Note that pressing Shift does not work when only one file is editable.
Ctrl+Shift+D Use this keyboard shortcut to show the popup menu of the most required diff commands.
All VCSs
Submit/Commit Click this button with drop-down to do one of the following:
  • Submit/Commit: select this option to check in the changes to your version control.
  • Commit and Push: select this option to have the changes pushed to the remote repository immediately after commit.

    This operation is available when you are using Git or Mercurial integration.

  • Create Patch: select this option to have IntelliJ IDEA generate a patch based on the changes to be checked in. In the Create Patch dialog box that opens, type the name of the patch file and specify whether you need a reverse patch.
  • Remote Run: select this option torun your personal build.

    This operation is available when you are logged in to TeamCity. Refer to TeamCity plugin documentation for details.

All VCSs

See Also

Last modified: 6 April 2015