Cursor does not recognize git changes

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

  1. Cannot generate Commit message (“Failed to generate commit message: No contents found”
  2. @Git returns empty for both branch and commit.

Steps to Reproduce

Not sure how this started. I updated my gitconfig to include remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*, which is when this started. Removing this from my git config does not fix the issue.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.42 (Universal)
VSCode Version: 1.105.1
Commit: 2e353c5f5b30150ff7b874dee5a87660693d9de0
Date: 2025-12-01T02:18:26.377Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. It looks like Cursor isn’t seeing the git repository after changing remote.origin.fetch, so @Git is empty and commit generation gives “No contents found”.

Could you please share:

  • Output of git status in the terminal inside the project (does it show changes?)
  • Source Control panel Cmd+Shift+G - are changes visible there?
  • Cmd+Shift+P → “Git: Show Git Output” - any errors related to repository detection?
  • Help > Toggle Developer Tools > Console - screenshot of “git” errors

Also check:

  • Try opening a clean profile: /Applications/Cursor.app/Contents/MacOS/Cursor --user-data-dir=/tmp/cursor-test and open the same project

Share the info, and I’ll pass it to the team.