Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Repository - LockFile Exists

I recently tried to commit to my repository via GitHub Desktop and was told there is a lock file preventing me from doing so. I do not recall uploading this lock file nor do I have an idea where it came from:

enter image description here

like image 950
tccpg288 Avatar asked Feb 14 '26 03:02

tccpg288


2 Answers

Might someone else pushed at the same time? Else, just try to stash changes, move to another branch, move back, apply stash and push again.

like image 97
ClaudiuSocaci Avatar answered Feb 15 '26 16:02

ClaudiuSocaci


I followed these steps and it works for me. Thanks

  • Enable the viewing hidden files and folders on Windows.
  • Go to your hidden .git directory shown in the error message
  • Delete the index.lock file located there.
  • After deleting the index.lock file you can do commit using GitHub Desktop again.
like image 45
armel sauvy Avatar answered Feb 15 '26 15:02

armel sauvy