Skip to content

Intermittent pending git lock #2718

Open

Description

@gitPhate

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?

Activity

  1. love-linger commented on Sep 18, 2026

    @love-linger
    Collaborator

    Do you enable Auto Fetch feature in SourceGit?

    SourceGit will not delete the git lock file manually. Instead, this file should be managed by git command itself.

    SourceGit will also run git status command when some files changed in the worktree to refresh the uncommitted local changes list (just like VS)

  2. gitPhate commented on Sep 23, 2026

    @gitPhate
    Author

    @love-linger If autofetch is this one it's disabled:

    Image

    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?

  3. love-linger commented on Sep 28, 2026

    @love-linger
    Collaborator

    @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.

  4. gitPhate commented on Sep 28, 2026

    @gitPhate
    Author

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions