Unable to create '.../.git/index.lock': File exists error using the git mergetool command

Issue #215 resolved
Artem Altukhov created an issue

Issue Description

the issue is reproducible only if they're more than one conflict file.

Cannot reproduce in Git Extension with the same data

Steps to reproduce

  1. get a merge conflict
  2. execute a command: git mergetool

Actual Result

it takes to resolve the first conflict and fails on the second one:

fatal: Unable to create 'C:/repos/code2/code/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

Expected Result

there should be no error

Comments (3)

  1. Evgeny Kralko repo owner

    @Artem Altukhov , I can't reproduce the issue locally, everything works fine with many conflicts (Araxis, WInMerge). To be honest with you, sometimes I face the same issue even using a pure console. Another reason - may be your merge tool which holds the file. I believe the issue is not related to Cong or fixed by “fix bug when cmd process stuck after closing the application” commit (which will be included in 0.2.98 version). Please give me know if you reproduce the issue again.

  2. Log in to comment