Cursor Thinks Files From Git Are Modified When They Are Not

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor gets confused about what files are modified, and then can’t read / write to them. Every time I open the editor, these modified files remain. I can’t save the file changes, as the “Keep All” button doesn’t work, not revert them.

Some files cursor will “touch” when I open the project, so it adds a single character return.

I ask cursor to fix it, which usually results in cursor using GIT to revert files, which isn’t the actual problem, and also doesn’t fix the issue.

Steps to Reproduce

I think its something to do with using Git Extentions and Cursor at the same time, but I am not 100% sure of the repro. Maybe opening the project / fetching the project in git Extensions while cursor is running.

Expected Behavior

Cursor’s own modified files should reflect the actual file status on Git. At the VERY LEAST, there should be a way of clearing the cursor file status cache to stop the issue from happening. I’ve had to manually delete cache folders, and lost entire project conversations and work, and the files still remain modifed.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.44 (system setup)
VSCode Version: 1.105.1
Commit: 20adc1003928b0f1b99305dbaf845656ff81f5d0
Date: 2025-12-24T21:41:47.598Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. This is a known issue and the team is working on a fix.

The issue is that Cursor sometimes adds whitespace or empty lines to files that were previously edited via Agent mode when the IDE starts up. The files become “sticky” and show up as changed even after commits.

Try these workarounds:

  1. Open the files in the Source Control tab, click “Keep”, then remove the added empty line. The file should disappear from the list
  2. Make a small change in any file, then stage and commit. Sometimes this “wakes up” the “Keep All” button
  3. Rename the file, fully close Cursor, open it again, then change the name back
  4. In the file, delete the highlighted blocks, save, then immediately Undo Ctrl+Z
  5. Ctrl+Shift+P → Developer: Reload Window

If nothing helps, please share:

  • A screenshot of the git diff for those files
  • Which exact files show up as changed
  • Whether you used Agent mode with those files before

Related thread: Cursor modifying files on startup

Hey Dean. Is there a way of clearing the mofied file cache? I tried deleting a load of folders with the name “cache” in the %AppData%\Cursor folder and lost all my project work / discussions, but the issue remains.

Unfortunately, there’s no safe way to clear the “modified files cache” without risking data loss. The problem is that Cursor stores file info in several places, and manually deleting folders can cause you to lose chat history and project settings (which is what happened to you).

The good news is this bug should be fixed in version 2.3.x, which has already started rolling out. You may get the update within 1 to 3 days (staged rollout). Check Help > Check for Updates.

After updating, the “sticky files” issue should be gone.

Thanks for the quick response! Should have sumitted a report sooner.

I’m on version 2.2.44 and check for updates doesn’t do anything. Is there a way of trying 2.3.X beta or something?

I am also having the same issue even after updating.

Version: 2.3.23
VSCode Version: 1.105.1
Commit: 655ee705c6c7b6da1da481d0fdf13191d5e3e980
Date: 2026-01-06T04:26:58.029Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Linux x64 6.14.0-37-generic

Hey, @Sergio_Reganati, thanks for the update.

This should’ve been fixed in 2.3.x, but it looks like you’re still seeing it on Linux. To help us debug it, could you share:

  • A screenshot of git diff for the files that show up as changed
  • The exact filenames that are “stuck”
  • Whether you used Agent mode on those files before the issue started

Hello Dean, here is the info you requested:

  1. Screenshot of clean git diff
  2. Stuck files, also screenshot provided
  3. Yes these files have been modified by the Agent.

Additional info: when i create a new file using the agent, until i accept the changes it only shows the files that were modified by the last prompt (screenshot provided). After i accept the changes, all the list of files (screenshot provided).

1 Like