fatal: Unable to create '/.git/index.lock': File exists
Asked Answered
C

4

8

When I try to rename any image name in my Xcode Project it gives following error.

fatal: Unable to create '/.git/index.lock': File exists. 

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.

Don't know what is going wrong. Thanks in Advance.

Columbarium answered 17/5, 2013 at 6:9 Comment(4)
this may halp's u #9283132Heisel
I tried everything,but same result.Columbarium
Check to see where you are issuing the command at. It should be issued at the root where you issued "git init"Pascual
Possible duplicate of Git - fatal: Unable to create '/path/my_project/.git/index.lock': File exists.Pair
B
18

Try

rm -f ./.git/index.lock

In your repository directory.

Bunny answered 17/5, 2013 at 6:13 Comment(2)
@DesertRose try rm .git/index.lockBrauer
@Deepesh Gairola Worked for me!Claw
V
1

I had my local repo inside a Wordpress plugin folder hosted by Mamp on osx. The permissions for the local server was set to "www" in the Mamp permission settings. I changed the permissions back to me, and the "/index.lock“ needs to be removed manually."-problem went away.

Violent answered 28/9, 2013 at 16:46 Comment(0)
W
0

For me, $rm index.lock while in my git repository also solved the problem

Welltimed answered 18/5, 2014 at 23:52 Comment(0)
B
0

Inside your project folder, go to git folder and remove index.lock file.

Basketry answered 25/3, 2022 at 6:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.