A lock file already exists in the repository, which blocks this operation from completing.

Now, we will solve this error in our blog.

Error: If you go to commit your file in GitHub Desktop then you get this error.

A lock file already exists in the repository, which blocks this operation from completing.

Solution:

you follow these steps and solve the error.

Step-1: Open the folder in your system.

your current repo path in your system.

Step-2: Click on { 3. (…) after options }.

open options

Step-3: Click view

For check hidden file.

Step-4: Hidden file and folder >Show hidden file and folder ( click on ) and click on ok.

Show hidden files and folder

Step-5: Open the .git folder and delete the index.lock.

delete the index.lock.

Step-6: Now, open GitHub Desktop

open GitHub Desktop > current repo

Step-7: Click on the commit.

Click on commit

The problem is solved.

Thanks for reading this blog.

if this blog is helpful for you then you can follow, like, and comment me your feedback.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ajay Dhangar

Ajay Dhangar

Hello, my name is Ajay Dhangar I’m a web developer with extensive experience for over 2 years. My expertise is to create and website design and more…