You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my everyday work I use SourceGit alongside Visual Studio where I use the git window to quickly navigate between edits.
Sometimes in the Git Changes window of Visual Studio I see:
A Git process may be running in the 'myrepo' repository. If there are no Git processes running, one may have crashed in this repository earlier.
I believe SourceGit may have some troubles deleting the git lock file sometimes, is there a way to check that? Logs or whatever?
@love-linger If autofetch is this one it's disabled:
I understand the lock file is managed by git, but git is invoked by SourceGit and I don't have problems if I don't open it, there must be something preventing git from deleting the lock file.
Can we enable some logs or is there a diagnose tool?
@gadfly3173 The issue you pointed out does exist. However, I believe it mainly occurs because SourceGit and VSCode simultaneously perform operations that require locking the index. For instance, while SourceGit runs git fetch, VS runs another git command that requires locking the index.
The original error message is shown in Visual Studio, not VSCode, but I checked and I normally also use VSCode with that repo open as well so it might be the case
Activity
love-linger commentedon Sep 18, 2026
Do you enable
Auto Fetchfeature inSourceGit?SourceGit will not delete the git lock file manually. Instead, this file should be managed by
gitcommand itself.SourceGit will also run
git statuscommand when some files changed in the worktree to refresh the uncommitted local changes list (just like VS)gitPhate commentedon Sep 23, 2026
@love-linger If autofetch is this one it's disabled:
I understand the lock file is managed by git, but git is invoked by SourceGit and I don't have problems if I don't open it, there must be something preventing git from deleting the lock file.
Can we enable some logs or is there a diagnose tool?
love-linger commentedon Sep 28, 2026
@gadfly3173 The issue you pointed out does exist. However, I believe it mainly occurs because SourceGit and VSCode simultaneously perform operations that require locking the index. For instance, while SourceGit runs
git fetch, VS runs another git command that requires locking the index.enhance: terminate `git status` command gracefully (#2718)
gitPhate commentedon Sep 28, 2026
The original error message is shown in Visual Studio, not VSCode, but I checked and I normally also use VSCode with that repo open as well so it might be the case