Very often I get this kind of errpr
git -c diff.mnemonicprefix=false -c core.quotepath=false checkout develop
fatal: Unable to create 'xxxxxxxx/.git/index.lock': File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
Completed with errors, see above.
This kind of error occurs during any operation, switching branch, creating hotfix, pulling data, ...
I can assure you that there are no other git process running and no crashes has been reported.
I'm unable to find a proper step to reproduce the problem, It seems to be a bit random