Auto AI Generated Git Commit After Accepted Agent Changes

It would be great to have an optional feature in Cursor to automatically run a git commit with AI generated message after accepting AI-generated code changes—especially when using Composer or Accept All.

This would make the Git history more meaningful by clearly associating each commit with a specific accepted change, helping developers understand what caused each change.

Ideal behavior could include:

  • Committing only staged files with AI changes
  • Using the AI-generated commit message (or a default fallback)
  • Optional toggle in settings to enable/disable this feature
  • Optionally trigger on:
    • Each “Accept All” from Composer
    • Each accepted code block

Thanks for considering!

3 Likes

Yeah, this is a great idea. Also provides a robust backup strategy alongside “restore checkpoint”