10

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.

4

4 Answers 4

19

Try

rm -f ./.git/index.lock

In your repository directory.

Sign up to request clarification or add additional context in comments.

2 Comments

@DesertRose try rm .git/index.lock
@Deepesh Gairola Worked for me!
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.

Comments

0

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

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.