【发布时间】:2014-10-27 12:37:35
【问题描述】:
当我尝试从 sublime 内部提交我的工作时,它给了我以下信息:
fatal: Unable to create 'my_project_path/.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.
我检查过,但 index.lock 根本不存在!当我在终端提交时,一切都很好。
有什么想法吗?
【问题讨论】:
-
是否存在权限问题? (崇高文本是否与您的帐户一起运行?)删除文件应该足够了(stackoverflow.com/a/20827294/6309),但在您的情况下,请检查是否没有任何“git”进程正在运行(ps -ef|grep git)
-
老实说,我不知道这是否是权限问题。我使用了您提到的命令: ps -ef|grep git 并得到以下结果: raeef 32550 27757 0 09:19 pts/3 00:00:00 grep --color= auto git 如果这是另一个进程,那么如何停止它?以及为什么我在终端中提交时它没有影响?
-
从该输出看来,另一个 git 进程没有运行。我认为此时这是权限问题或您与 Sublime Text 一起使用的 Git 版本的问题。
-
我的 sublime 版本是 3 build 3065 并在 build 3059 上尝试过,git 包是 v2014.07.13.22.18.27 b> 并且 git 版本是 2.1.0 如果是权限问题,知道如何解决吗?
-
你去查一下index.lock文件还存在吗? (如果是,则表明命令已中止。如果不是,则可能是两个命令试图同时运行。)
标签: git sublimetext sublimetext3 ubuntu-14.04