WebStorm 2021.2 Help

Compare file versions比较文件版本

WebStorm allows you to examine the differences between two revisions of a file, or between its current local copy and the repository version. WebStorm允许您检查文件的两个版本之间的差异,或者文件的当前本地副本和存储库版本之间的差异。The differences are displayed in the Differences viewer. 差异将显示在差异查看器中。For details on how to filter, navigate and apply changes in the Differences Viewer, see Compare files, folders, and text sources.有关如何在差异查看器中过滤、导航和应用更改的详细信息,请参见比较文件、文件夹和文本源

Compare a modified file with its repository version将修改后的文件与其存储库版本进行比较

  1. Open the Commit tool window Alt+0打开“提交”工具窗口Alt+0

  2. Select a file and click diff icon on the toolbar, or press Ctrl+D.选择一个文件并单击工具栏上的diff icon,或按Ctrl+D

Compare the current revision of a file with a selected revision in the same branch将文件的当前版本与同一分支中选定的版本进行比较

  1. Select a file in the Project tool window, and choose <your_VCS> | Compare With from the context menu.在“项目工具”窗口中选择一个文件,然后从上下文菜单中选择<your_VCS>|“比较”

  2. Choose a revision you want to compare the current file version with from the dialog that opens.从打开的对话框中选择要与当前文件版本进行比较的修订。

Compare the current revision of a file with another branch将文件的当前版本与另一个分支进行比较

  1. Select a file in the Project tool window, and choose <your_VCS> | Compare With Branch from the context menu.在“项目工具”窗口中选择一个文件,然后从上下文菜单中选择<your_VCS>|“与分支进行比较”

  2. Choose the branch you want to compare the current file version with from the dialog that opens.从打开的对话框中选择要与当前文件版本进行比较的分支。

Last modified: 08 March 2021