> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mossx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate a commit

> Use CC GUI to generate a commit message from the current Git changes and fill it back into the commit UI.

CC GUI can read the current project’s Git diff, generate a commit message, and write it back into the JetBrains Commit message box when possible.

<img src="https://mintcdn.com/mossx-docs/kz4nt5KFSKzkAZwe/images/jetbrains/scm-commit.png?fit=max&auto=format&n=kz4nt5KFSKzkAZwe&q=85&s=59b614063470faa77591b9f4e6573362" alt="Generate button in the commit UI" width="100%" data-path="images/jetbrains/scm-commit.png" />

## Check these first

1. The project is a Git repo and has uncommitted changes
2. **Settings → General → Behavior → AI commit messages** is on
3. **Settings → Commit AI** already has a working provider and model
4. The IDE has Git support enabled (Git4Idea)

If the master switch is off, the action says the feature is disabled.

## Generate one commit message

<Steps>
  <Step title="Open the Commit tool window">
    Confirm the change list has files. With no diff, the action says there are no changes.
  </Step>

  <Step title="Click generate">
    Click the CC GUI generate button on the VCS Message toolbar, or run Generate Commit Message from **Find Action**.
  </Step>

  <Step title="Wait for the result">
    Generation runs on a background thread so it does not block the EDT. On success, the message box contains a cleaned-up commit message.
  </Step>
</Steps>

If generation fails, the plugin drops the full prompt into chat and explains why.

## Configure Commit AI

Open **Settings → Commit AI**:

* Choose a provider and model (Claude / Codex / each CLI)
* Edit the global prompt
* Override the prompt per project

You can lock the language, a title format, or require a body.

<Note>
  Commit AI sends the diff to the selected model. Very large diffs are truncated. For a sensitive repo, review the prompt and provider first.
</Note>

## FAQ

| Symptom                             | Cause                                                                                              |
| ----------------------------------- | -------------------------------------------------------------------------------------------------- |
| Says there is no project            | Open a project first                                                                               |
| Says there are no changes           | Leave an uncommitted diff first                                                                    |
| Says there is no available provider | Configure [Claude](/en/jetbrains/providers/claude) or [Codex](/en/jetbrains/providers/codex) first |
| Button is missing                   | Confirm this is a Git repo and the master switch is on                                             |
