WebStorm creating git index.lock
Answered
Hi!
Every time I open WebStorm the IDE creates an index.lock file in the .git folder, which prevents the work of external git clients.
I'm using the most recent version of WebStorm and GitKraken as an external git client.
When I close WebStorm, the index.lock file disappears and I can use GitKraken again.
Is there an option to disable this behavior?
Thanks already for your help!
Please sign in to leave a comment.
the IDE relies on command-line git so you could set the GIT_OPTIONAL_LOCKS environment variable to 0, and it will affect all the git status calls. Just be sure to restart IDE after the environment variable set.
What IDE version do you use, BTW?
Hi thx for your answer, but I'm still experiencing the same issue.
I'm using Webstorm 2020.2.1
> so you could set the GIT_OPTIONAL_LOCKS
WebStrom sets this flag for all commands it calls since 2019.1.
But for this to work you need at least git 2.15 or above. Please make sure you are using the latest git client.
@Dmitriy Smirnov thx! Updating the command line client (git for windows) actually fixed the problem! It was not necessary to set the environment variable.
Glad it helped!
> It was not necessary to set the environment variable.
Yes, because WebStrom sets it automatically since 2019.1. But only git 2.15 or above respect it.