2014-09-03 184 views
11

与崇高的文本git的承诺当我试图从里面崇高它给了我下面的信息提交我的工作:无法在Ubuntu 14.04

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根本不存在!当我在终端进行时,一切都很好。

有什么想法?

+1

是否有权限问题? (崇高的文本运行与您的帐户?)删除文件应该是足够的(http://stackoverflow.com/a/20827294/6309),但在你的情况下,检查是否没有任何“混帐”进程运行( ps -ef | grep git) – VonC 2014-09-03 06:02:04

+0

老实说,我不知道这是否是一个权限问题。 我用你提到的命令:** ps -ef | grep git **并得到如下结果:** raeef 32550 27757 0 09:19 pts/3 00:00:00 grep --color = auto git * * 如果这是另一个过程,那么如何阻止它呢?以及为什么它不影响我在终端中提交的时间? – 2014-09-03 06:32:58

+0

该输出显示另一个git进程没有运行。我相信在这一点上它是一个权限问题或与Sublime Text一起使用的Git版本的问题。 – jtl999 2014-09-03 06:52:11

回答

1

我降级git从2.1.01.9.1现在都好。

2

试试这个

rm -f my_project_path/.git/index.lock 

有时候,有不一致防止git的释放锁,你还,为了以防万一,应该运行git一致性检查,以确保您的本地混帐回购协议是一致的:

git fsck 
+1

这不适合我,还有什么想法? – 2014-09-11 09:50:26