无法使用 eGit 插件将文件添加到索引 (Eclipse Neon3)

Unable to add file to index using eGit plugin (Eclipse Neon3)

当我 select 将文件添加到索引时,Eclipse 显示以下错误。有什么办法可以解决这个问题吗?

Failed to add resource to index
    Failed to add resource to index
    Exception caught during execution of add command

下面是异常的堆栈跟踪:

org.eclipse.core.runtime.CoreException: Failed to add resource to index
    at org.eclipse.egit.core.op.AddToIndexOperation.execute(AddToIndexOperation.java:80)
    at org.eclipse.egit.ui.internal.actions.AddToIndexActionHandler.run(AddToIndexActionHandler.java:57)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
    at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:252)
    at org.eclipse.egit.core.op.AddToIndexOperation.execute(AddToIndexOperation.java:77)
    ... 2 more
Caused by: org.eclipse.jgit.errors.LockFailedException: Cannot lock C:\Users\kkuma203\git\voice-war-nwp-pluto\.git\index
    at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:250)
    at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:327)
    at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:293)
    at org.eclipse.jgit.lib.Repository.lockDirCache(Repository.java:1192)
    at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:148)
    ... 3 more

通过手动删除 index.lock 文件解决了这个错误。 我现在可以将文件添加到索引。

文件位于/home/user/location/.git/index.lock