AI in VCS integration
AI Assistant integrates with version control systems to help you work more efficiently with your code history. It can generate commit messages, summarize changes, and assist in understanding diffs, making version control tasks easier to manage.
Generate commit messages
AI Assistant can send your diffs to the LLM (Large Language Model), which will generate a commit message describing your changes.
Press Alt+0 to open the Commit tool window.
Click
Generate Commit Message with AI Assistant.
Edit the message if necessary.
You can also customize the prompt used by AI Assistant to generate commit messages. For example, you can include the branch name in the commit message or instruct AI Assistant to list each change as a separate item.
Click
in the bottom-right corner of the Commit tool window.
In the menu, navigate to the AI Assistant section and specify your instructions in the Prompt for generation field.
Alternatively, you can modify the prompt in the Prompt Library.
Customize the commit message generation prompt
You can customize the prompt used by AI Assistant to generate commit messages by editing it in the Prompt Library.
Press Ctrl+Alt+S to open settings and then select
.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. Use the
$GIT_BRANCH_NAME
to reference the name of the branch in the commit message.Click Apply.
Perform Self-Review with AI
Before committing your changes, you can ask AI Assistant to review your updates. This helps highlight any potential issues, allowing you to make improvements immediately or track them for future revisions.
Press Alt+0 to open the Commit tool window.
Select the changes that you want to review before committing.
Click
Self-Review with AI. The Problems tool window opens with the AI Self-Review tab selected.
On the AI Self-Review tab, review the detected issues:
To navigate to the issue in the editor, either double-click it or select it and press F4.
If a quick fix is available for the selected issue, click
to apply it.
To filter the list of issues, click
View Options and choose the desired filtering criteria.
To view the selected issue in its source context, click
Open Editor Preview. This opens a separate preview pane where you can change the code and apply available quick-fixes.
Just like with uncommitted changes, you can perform a review for the changes that were already committed.
Click
in the bottom-left corner (in DataGrip, click
More tool windows in the header and select Git) or press Alt+9 to open the version control tool window.
In the commits pane, select the commit that you want to review and click
Self-Review with AI. AI Assistant will review all files in the commit.
Review the changes on the AI Self-Review tab.
Define guidelines for Self-Review with AI
You can specify a Markdown file with code review guidelines that will be taken into account by AI Assistant during code review.
Here is an example of what such guidelines might look like:
Edit and improve commit messages
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 (in DataGrip, click
More tool windows in the header and select Git) or press Alt+9 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 Ctrl+Shift+K to push the updated commit message as well.
Explain commits
AI Assistant can summarize the changes made in one or several commits.
Click
in the bottom-left corner or press Alt+9 to open the version control tool window (in DataGrip, click
More tool windows in the header and select Git).
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.
Generate title and description for pull and merge requests
AI Assistant can generate titles and descriptions for pull requests and merge requests directly from JetBrains IDEs.
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.
Resolve Git conflicts with AI
When multiple contributors are working with the same part of the codebase, you may encounter overlapping changes that cannot be merged automatically.
JetBrains IDEs have 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.
Generate a summary of an incoming pull request
AI Assistant can generate a summary of an incoming pull request, capturing key details and providing a brief description of the changes. To enable this feature:
Press Ctrl+Alt+S to open settings and then select
.In the Features section, enable the GitHub Plugin: Generate a summary upon opening a Pull Request setting.
Click Apply.
After that, when you open an incoming pull request, AI Assistant will generate a brief summary.

If the generated summary is not clear enough, click Regenerate to receive an updated version.
You can also fine-tune the summary generation process. To do this:
Hover over the generated summary and click
.
Modify the settings as required:
Generate automatically on open – enable this setting if you want to automatically generate the summary on opening the pull request.
Verbosity – adjust the level of detail in the summary. Higher verbosity includes more information, while lower verbosity keeps it brief and to the point.
Formality tone – control how formal or informal the summary sounds.
Personality – define the style or character of the summary.
Customization prompt – provide specific instructions or preferences to fine-tune the generated summary.
Generate shelf title
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 Alt+0 to open the Commit tool window.
Select the file or changelist you want to shelve and click
Shelve Silently on the toolbar or press Ctrl+Shift+H.
AI Assistant will automatically generate the shelf name for the shelved changes.
To switch off this feature, press Ctrl+Alt+S to open the settings, go to Generate a title for the shelved changelist checkbox.
, and clear the