WebStorm 2020.2 Help

Commit Changes dialog

Use this dialog to commit (check in) changes from the selected changelist 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.

Modified files pane

This section contains a list of files that have been modified since the last commit. Deselect the check-boxes next to the files that you want to exclude from the current commit.

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

Commit Message pane

In this area, enter a comment to the current commit. You cannot commit your changes until you enter some description in the Commit Message field.

This comment will also be used as the name of the patch file, if you decide to create a patch.

You can click Commit Message history Commit Message history Ctrl+M to choose from the list of recent commit messages.

VCS-specific controls

The controls in this section are located in the top-right part of the dialog, and contain the options that are specific for the version control system you are using.

ItemDescription
Author Use this list to select the author of the changes that you are going to commit. This may be useful when you are committing changes made by another person.
Amend commit Select this checkbox to replace the previous commit with the current changes (see Git Basics: Undoing Things for details).
Sign-off commit select if you want to sign off your commit to certify that the changes you are about to check in have been made by you, or that you take the responsibility for the code you're committing.

When this option is enabled, the following line is automatically added at the end of the commit message: Signed off by: <username>

ItemDescription
Amend commit Select this checkbox to replace the previous commit with the current changes (see Git Basics: Undoing Things for details).
ItemDescription
Keep files locked Select this checkbox to keep the changed files locked after they are checked in.
ItemDescription
Jobs

This area is available only if you select the Enable Perforce Jobs Support checkbox on the Perforce Settings page.

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

  • Remove button Unlink selected jobs: click this button to detach the selected job from the changelist.

  • Edit associated jobs button Edit associated jobs: click this button to open the Edit Jobs Linked to Changelist dialog where you can search for available jobs, view their details, and link jobs to the selected changelist.

  • Add button Find and link job matching the pattern: click this button to start quick search for the job that matches the pattern specified in the field and attach the job to the changelist.

    In the field, specify the exact name of the job or a search pattern according to the Perforce jobs syntax rules.

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

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

Jump to the next or previous difference.

When the last or first difference is reached, WebStorm 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 Jump to Source button Jump to Source
F4
Open the selected file in the active pane in the editor. The caret is 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.

Viewers

Select a viewer mode: side-by-side or unified. The side-by-side mode has two panels, the unified mode has one panel.

You can edit code and perform Apply, Append, Revert actions in both viewers.

You can change text only in the right-hand part of the side-by-side viewer, or in the lower line in the unified viewer.

You can edit only local versions of your files. You cannot edit files that have read-only status.

Whitespace

Define how the differences viewer should treat whitespaces.

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

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

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

    • If two lines are different, 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: ignores 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, differences between a b c and a \n b c are not highlighted in this mode.

Highlighting mode

Select the way differences granularity is highlighted.

The available options are:

  • Highlight words: modified words are highlighted

  • Highlight lines: modified lines are highlighted

  • Highlight split changes: if this option is selected, big changes are split into smaller changes.

    For example, A \n B and A X \n B X are treated as two changes instead of one.

  • Highlight symbols: modified symbols are highlighted

  • Do not highlight: if this option is selected, the differences are not highlighted at all.

    Use the Do not highlight option when you work with the files that were significantly modified. In such cases, highlighting might introduce additional difficulties during a review.

the Collapse All buttonCollapse unchanged fragmentsCollapse all the unchanged fragments in both files. The amount of non-collapsible unchanged lines is configurable in the Diff & Merge settings page. To open the Diff & Merge page, open settings by pressing Ctrl+Alt+S and navigate to Tools | Diff & Merge.
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 F1Open a browser and show the corresponding help page.

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

Submit / Commit button

Click this button to commit the selected files, or hover your mouse over this button to display one of the following available commit options:

  • Commit and Push: select this option to push the changes to the remote repository immediately after the commit. This option is available if you are using Git or Mercurial as a version control system.

  • Create MQ Patch: select this option to create an MQ patch based on your changes. This option is only available if you are using Mercurial as a version control system.

  • Create Patch: select this option if you want WebStorm to generate a patch based on the changes you are about to commit. In the Create Patch dialog that opens, type the name of the patch file and specify whether you need a reverse patch.

  • Remote Run: select this option to run your personal build. This option is only available when you are logged in to TeamCity. Refer to TeamCity plugin documentation for details.

Last modified: 04 September 2020