Get AI assistance for VCS integration
This functionality relies on the AI Assistant plugin that requires an additional license.
For more information about licensing and enabling AI Assistant, refer to JetBrains AI Service licensing and Enable AI Assistant plugin.
AI Assistant can send your diffs to the LLM (Large Language Model), which will generate a commit message describing your changes.
Press Alt00 to open the Commit tool window.
Click Generate Commit Message with AI Assistant.
Edit the message if necessary.
Press CtrlAlt0S to open settings and then select Tools | AI Assistant | Prompt Library.
In the Built-In Actions section, select Commit Message Generation.
In the editor field on the right, specify the rules for commit message generation, like the required number of characters or a different language.
Click Apply.
When you have already committed your changes, you can still edit your commit message. Use AI Assistant to help you analyze and better describe the committed changes.
Click in the bottom-left corner or press Alt09 to open the version control tool window.
In the commits pane, right-click the commit you want to update and select Edit Commit Message in the context menu.
In the dialog that opens, click Improve Commit Message with AI Assistant.
AI Assistant analyzes the committed changes and generates an improved message.
Edit the new message if necessary and click OK to save the changes.
If the commit has already been pushed to the remote repository, press CtrlShift0K to push the updated commit message as well.
AI Assistant can summarize the changes made in one or several commits.
note
This option is only available if you are using Git or Mercurial for version control.
Click in the bottom-left corner or press Alt09 to open the version control tool window.
In the commits pane, select the commit or several commits you want to summarize, right-click them and select Explain Commit with AI Assistant in the context menu.
AI Assistant provides the summary of the selected commits.
AI Assistant can generate titles and descriptions for pull requests and merge requests directly from PyCharm.
When creating a new pull request or a merge request in the corresponding tool window, click Generate a Title and Description with AI Assistant in the description field.
When multiple contributors are working with the same part of the codebase, you may encounter overlapping changes that cannot be merged automatically.
PyCharm has a tool to resolve any such conflicts, and AI Assistant can help you by automatically merging conflicting changes.
In the Merge Revisions dialog, click Merge with AI.
AI Assistant then merges both non-conflicting and conflicting changes.
Review the merged result in the central pane of the dialog, edit if necessary, and click Apply.
Revert changes in the modified lines by clicking Revert.
For more information about merging conflicting changes, refer to Resolve Git conflicts.
When you silently shelve your changes, the new shelf gets the default Changes name. With a lot of shelves, it can become confusing to find the necessary changes.
Instead of manually renaming each shelf, use AI Assistant to automatically generate a title for the silently shelved changelist.
Press Alt00 to open the Commit tool window.
Select the file or changelist you want to shelve and click Shelve Silently on the toolbar or press CtrlShift0H.
AI Assistant will automatically generate the shelf name for the shelved changes.
To switch off this feature, press CtrlAlt0S to open the settings, go to Tools | AI Assistant, and clear the Generates title for shelved change list checkbox.
Thanks for your feedback!