Cursor generates commit messages from staged changes.

  1. Stage files to commit
  2. Open the Git tab in the sidebar
  3. Click the sparkle (✨) icon next to the commit message input

Generated messages use staged changes and repository git history. If you use conventions like Conventional Commits, messages follow the same pattern.

Add shortcut

To bind to a keyboard shortcut:

  1. Go to Keyboard Shortcuts (Ctrl+R+Ctrl+S or Ctrl+Shift+P and search “Open Keyboard Shortcuts (JSON)”)
  2. Add this binding for Ctrl+M:
    {
      "key": "cmd+m",
      "command": "cursor.generateGitCommitMessage"
    }
    
  3. Save

You cannot customize commit message generation. Cursor adapts to your existing commit style.