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

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

by Shahriar Sagor

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.

close

You may also like