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