WebStorm 2018.1 Help

Viewing Difference Between Files from Command Line

You can use WebStorm as a command line tool for viewing differences between files.

  • In the command line, run the diff command using the following syntax:
    <WebStorm> diff path1 path2

The selected files will be opened in the Differences Viewer for Files.

The command options are as follows:

Option Description
<WebStorm>

The platform-specific WebStorm launcher.

On macOS and Linux, it is recommended to use the command line launcher created during the WebStorm installation, or create one manually by selecting Tools | Create Command-line Launcher on the WebStorm main menu. Refer to Working with WebStorm Features from Command Line for details.

On Windows, it is recommended to add the path to the WebStorm executable to the Path environment variable.

path1 The full path to the local copy of the file.
path2 The full path to the repository version copy of the file.

Examples

Syntax
webstorm.exe diff path1 path2
Example
webstorm.exe diff C:\MyProject\Readme.md C:\MyProject\Readme.md.bak
Syntax
webstorm diff path1 path2
Example
webstorm diff ~/MyProject/Readme.md ~/MyProject/Readme.md.bak
Last modified: 11 May 2018

See Also