WebStorm 2021.2 Help

Manage changelists管理变更列表

A changelist is a set of local changes that have not yet been committed to a VCS repository.变更列表”是一组尚未提交到VCS存储库的本地变更。

With changelists, you can group changes related to different tasks and commit these sets of changes independently. 使用变更列表,您可以将与不同任务相关的变更分组,并独立提交这些变更集。See Commit changes locally for details.有关详细信息,请参阅本地提交更改

Changelists are displayed in the Local Changes view. Initially, there is a single Default Changelist. 更改列表显示在“本地更改”视图中。最初,只有一个默认的变更列表It is displayed in bold to show its active status, which means that all new changes are automatically placed in this changelist. 它以粗体显示,以显示其活动状态,这意味着所有新更改将自动放置在此更改列表中。There is also an Unversioned Files changelist that groups newly created files that haven't been added to your VCS yet.还有一个“未版本文件”更改列表,用于对尚未添加到VCS的新创建文件进行分组。

You can create as many changelists as needed and make any of them active at any moment. 您可以根据需要创建任意多个变更列表,并随时激活其中任何一个。You can move any uncommitted changes to any changelist.您可以将任何未提交的更改移动到任何更改列表。

Create a new changelist创建一个新的变更列表

  1. In the Local Changes view, click the Changelist icon on the toolbar and select New Changelist.在“本地更改”视图中,单击工具栏上的the Changelist icon并选择“新建更改列表”。

  2. In the New Changelist dialog, specify the name of the new changelist, and add a description (optional).在“新建变更列表”对话框中,指定新变更列表的名称,并添加说明(可选)。

Set the active changelist设置活动的变更列表

  • In the Local Changes view, select a non-active changelist and press Ctrl+Space or right-click it and choose Set Active Changelist from the context menu. 在“本地更改”视图中,选择一个非活动更改列表,然后按Ctrl+Space或右键单击它,然后从关联菜单中选择“设置活动更改列表”。All new changes will be automatically placed in this changelist.所有新更改将自动放置在此更改列表中。

Move changes between changelists在变更列表之间移动更改

  1. In the Local Changes view, Select the changes that you want to move to another changelist.在“本地更改”视图中,选择要移动到其他更改列表的更改。

  2. Right-click the selection or click the Changelists icon on the toolbar and choose Move to Another Changelist Alt+Shift+M.右键单击所选内容或单击工具栏上的the Changelists icon,然后选择“移动到另一个变更列表Alt+Shift+M

  3. In the dialog that opens, select an existing changelist or enter the name for a new changelist.在打开的对话框中,选择现有变更列表或输入新变更列表的名称。

  4. You can choose to make the target changelist active and to track context for it (WebStorm will save the context associated with this changelist, and will restore it when this changelist becomes active).您可以选择使目标变更列表处于活动状态并跟踪其上下文(WebStorm将保存与此变更列表关联的上下文,并在此变更列表变为活动状态时将其还原)。

Delete a changelist删除变更列表

  • Right-click a changelist and choose Delete Changelist from the context menu.在变更列表上单击鼠标右键,然后从关联菜单中选择“删除变更列表”。

Last modified: 08 March 2021