Cursor is incessantly blocking, by "git commit", a path that is not open on workspace / window

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Yesterday I started noticing that I was having a lot of “git .lock” errors happening, as if there was a crashed “git commit” process. i kept cleaning the git .lock. and it kept coming back up. i was basically at a standstill with doing any work.

the eerie thing is that i had cursor open, but not on that repo, not on that folder. but cursor was constantly taking it up, and thus i couldn’t work with any other prompters for that repo/folder. i most definitely didn’t have it open in any workspace or anywhere at all, so this was a remnant. there had been a time when i had had cursor running on that workspace, but i didn’t have it open.
restarting macOS didn’t change anything. i am now having toh ave Cursor closed, so it does not interfere with a repo that isn’t open on the workspaces/windows that Cursor is on.

i was very tired yesterday, and had a heckuva time trying to make any sense of what was going on, i just wanted to quickly do my work and get the PRs landed, but i was constantly being bombarded by .git lock mess.

Steps to Reproduce

just have cursor open, even if a workspace related to the repo, is NOT open.

Expected Behavior

cursor shouldn’t be interfering, crashing, or wrecking, the .git lock file of a repository that is NOT open in cursor.

Operating System

MacOS

Version Information

newest cursor version. i don’t want to open it right now, because i have stuff i need to finish!

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. This is a known issue: Cursor keeps a hold on the .git/index.lock file. There was a similar report recently: Git Lock File Issue in Cursor

Your case is more interesting. The repo isn’t even open in the workspace, but Cursor is still locking it. The team knows about the git lock file issue, but I’ll add your case since it seems like an expanded version of the bug.

Workaround for now:

  • Fully quit Cursor (please double-check in Activity Monitor that all processes are gone)
  • Manually delete .git/index.lock
  • Run your git operations
  • You can launch Cursor again, but if it starts locking it again, keep it closed while you work with that repo

When you can open Cursor, can you share the exact version (Help > About)? That’ll help the team. Also, were you previously running multiple workspaces at the same time with this repo?

i seem to be having this running, even while cursor is closed

could this be the culprit?

Yes, that could be the reason.

Force quit it in Activity Monitor (and check if there are any other processes with the word “Cursor”), then delete .git/index.lock.

Please send me your version when you can (Cursor > About).