git 如何解决这个问题,在执行合并命令期间捕获异常。org.eclipse.jgit.errors.LockFailedException?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43995106/
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
How to solve this, Exception caught during execution of merge command. org.eclipse.jgit.errors.LockFailedException?
提问by Gray
When I pull using git this exception appears and I don't know what its say that Cannot lock /home/user/location/.git/index.
当我使用 git 拉取时,出现此异常,我不知道它所说的无法锁定 /home/user/location/.git/index。
org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. org.eclipse.jgit.errors.LockFailedException: Cannot lock /home/user/location/.git/index
org.eclipse.jgit.api.errors.JGitInternalException:在执行合并命令期间捕获异常。org.eclipse.jgit.errors.LockFailedException:无法锁定/home/user/location/.git/index
回答by Gray
For a record, Yes I already solved it, I just manually deleted /home/user/location/.git/index.lock. It works for me, but just remember you can find your .git/index.lockto the location where you've installed your git.
作为记录,是的,我已经解决了,我只是手动删除了/home/user/location/.git/index.lock。它对我有用,但请记住,您可以在安装 git 的位置找到.git/index.lock。
回答by kunal deep
The above solution works really well. Actually, when you read the error message carefully it indicates something like this
上述解决方案非常有效。实际上,当您仔细阅读错误消息时,它表示类似这样的内容
- C:\talend\6.3.1\Talend-Studio-20161216_1026-V6.3.1\workspace.repositories\1015322431.git\talend\master\
- C:\talend\6.3.1\Talend-Studio-20161216_1026-V6.3.1\workspace.repositories\1015322431.git\talend\master\
index
指数
follow the path your local machine and look for index.lockGo ahead and delete it.
按照本地机器的路径查找index.lock继续并删除它。