Solve – fatal: Unable to create ‘/myproject/.git/index.lock’: File exi

Share Me
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Today now i will share with you my an experience. When i was working on my laravel 8 project, i did all the changes but when i want to push then i was found a this fatal error. and It’s not able to create the index.lock file in .git folder. Then I was also give the full permission to .git folder and then also try to remove the direct index.lock file from .git directory but get the same error as like as bellow.

Error

fatal: Unable to create '/var/www/me/theme_backend/.git/index.lock': File exists.

But at last i was found how can i solve this problem, just need to run bellow the command and it will work.

rm -f ./.git/index.lock

Read Also : How to Create Custom Blade Directive in Laravel?

Thanks for read. I hope it help you. For more you can follow us on facebook.

About Shahriar Sagor

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by Shahriar Sagor →