Viewing Difference Between Files from Command Line
You can use DataGrip as a command line tool for viewing differences between files.
- In the command line, run the
diff
command using the following syntax:<DataGrip> diff path1 path2
The selected files will be opened in the Differences Viewer for Files.
The command options are as follows:
Option | Description |
---|---|
<DataGrip> | The platform-specific DataGrip launcher. On macOS and Linux, it is recommended to use the command-line launcher created during the DataGrip installation, or create one manually by selecting on the DataGrip main menu. Refer to Besides working from within DataGrip, you can perform the following actions from the command line: for details. On Windows, it is recommended to add the path to the DataGrip executable to the |
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
-
datagrip.exe diff path1 path2
- Example
-
datagrip.exe diff C:\MyProject\Readme.md C:\MyProject\Readme.md.bak
- Syntax
-
datagrip diff path1 path2
- Example
-
datagrip diff ~/MyProject/Readme.md ~/MyProject/Readme.md.bak