lazygit: fatal: Unable to create `../index.lock`: File exists.
For some time now lazygit seems to bug all the time. I’m 100% sure that there are no other programs running in the background that could do some git operations.
I try to open lazygit from the terminal, but everytime I try to do any operation after that I get the error about the git lock. So I remove it by hand rm -rf .git/index.lock
and get back to lazygit, same thing.
It doesn’t matter if I do this from bare console or from the console inside neovim. Sometimes after deleting the index.lock file and getting back it works fine, only to complain again a usage later.
If I remove the file manually and then use git commands instead of using lazygit, everything works fine.
Windows, but I’m on WSL2 kali-linux Linux stacjonarny 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 GNU/Linux
Lazygit version 0.34
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (6 by maintainers)
Still meet this issue on 0.40.2.
My experience is that when this lock window appear, I exit lazygit, delete the
index.lock
file, and enter lazygit, then:a
, the lock window won’t appear. Then if I hita
again to unstage, and stage one file, the lock window won’t appear.Welp, fun while it lasted
Uhhh, well then… try updating? 😅