xcode 致命:无法创建“/.git/index.lock”:文件存在
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16602544/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
fatal: Unable to create '/.git/index.lock': File exists
提问by Desert Rose
When I try to rename any image name in my Xcode Project
it gives following error.
当我尝试重命名我的任何图像名称时,Xcode Project
它会出现以下错误。
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.
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.
不知道出了什么问题。提前致谢。
回答by Deepesh Gairola
Try
尝试
rm -f ./.git/index.lock
In your repository directory.
在您的存储库目录中。
回答by bonsak
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.
我在 osx 上由 Mamp 托管的 Wordpress 插件文件夹中有我的本地存储库。本地服务器的权限在 Mamp 权限设置中设置为“www”。我把权限改回了我,“/index.lock“需要手动删除。”问题消失了。
回答by Laura
For me, $rm index.lock while in my git repository also solved the problem
对我来说,在我的 git 存储库中的 $rm index.lock 也解决了这个问题