Manage VCS Changelists in IntelliJ IDEA
Group and commit changes related to certain tasks so you have a cleaner commit history.
Select the files or changed lines in a file which you want to group together for certain tasks and use ⌘⇧M (macOS) / Alt+Shift+M (Windows/Linux) to bring up the Move Files to Another Changelist dialog.
You can give it a name to create a new changelist or choose from an existing changelist. IntelliJ IDEA will restore the selected changes in the corresponding changelist.
Default Active Changelist
Use ⌘0 (macOS) / Alt+0 (Windows/Linux), to show the Commit tool window.
Changes in the Commit tool window** are in the default active changelist. The active changelist is highlighted in bold.
Set Active Changelist
You can set a changelist to Active if you want to commit your changes to VCS. Select the changelist and use ⌃␣ (macOS) / Ctrl+Space (Windows/Linux) to set it to the active changelist.
Creating Changelist
Using Search Everywhere
Use ⇧⇧ (macOS) / Shift+Shift (Windows/Linux), to bring up the Search Everywhere dialog. You can now search for Changelist and select New changelist... to bring up New changelist dialog.
Using Commit Window
You can also right-click or secondary click on the Commit Window to show the options and click New changelist... to bring up the New changelist dialog.
New changelist dialog
New Changelist dialog Reference
Deleting Changelist
You can use the Commit Window to Delete Changelist
Alternatively, you can use ⌘⇧A (macOS) / Ctrl+Shift+A, to bring up the Find Actions dialog which will filter the Search Everywhere dialog to just Actions.
Scenarios to use different changelists
- Suppose you are working on your code which requires only selected changes to be committed in VCS and you want to continue developing your code. In that case, you can move your changes to a different changelist and group together.
- If you want to run your application with a unique configuration without impacting your existing code, you can maintain the changed files in different changelists.