Unable to create '/media/sf_nginx/H2_20151103/H2/.git/index.lock': File exists.

原创 2015年11月19日 14:13:07


今天不知怎么回事,git 突然不能add修改文件,错误信息如下,但是很奇怪的是git status 没有问题,依然正常工作

[root@test01 test_code_driver]# git add test_prefix.h
fatal: Unable to create '/media/sf_nginx/H2_20151103/H2/.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.


在网上查看了相关解决方案,于是在本地仓库.git文件夹下面,删除index.lock

drwxrwxrwx 1 root root      0 Nov  3 16:57 branches
-rwxrwxrwx 1 root root     30 Nov 18 17:50 COMMIT_EDITMSG
-rwxrwxrwx 1 root root    503 Nov  9 11:23 config
-rwxrwxrwx 1 root root     73 Nov  3 16:57 description
-rwxrwxrwx 1 root root  13762 Nov 19 13:56 FETCH_HEAD
-rwxrwxrwx 1 root root     48 Nov  9 14:32 HEAD
drwxrwxrwx 1 root root   4096 Nov  3 16:57 hooks
-rwxrwxrwx 1 root root 325171 Nov 18 17:50 index
-rwxrwxrwx 1 root root      0 Nov 18 18:04 index.lock
drwxrwxrwx 1 root root      0 Nov  3 16:57 info
drwxrwxrwx 1 root root      0 Nov  3 16:57 logs
drwxrwxrwx 1 root root      0 Nov  5 17:30 modules
drwxrwxrwx 1 root root  40960 Nov 16 18:10 objects
-rwxrwxrwx 1 root root     41 Nov  9 11:23 ORIG_HEAD
-rwxrwxrwx 1 root root   9374 Nov  3 16:57 packed-refs
drwxrwxrwx 1 root root      0 Nov  9 10:23 refs
-rwxrwxrwx 1 root root    805 Nov 19  2015 sourcetreeconfig
[root@test01 .git]# rm -f index.lock


问题解决,git可以正常工作


具体原因有时间再看

相关文章推荐

Unable to load configuration. - bean - jar:file:/H:/Program Files/Apache Software Foundation/T

Unable to load configuration. - bean - jar:file:/H:/Program%20Files/Apache%20Software%20Foundation/T...

How to create .lib file when you only have .dll and .h files

1. 原文地址:http://www.codeproject.com/KB/cpp/libfromdll.aspx 这篇讲解了DEF文件地结构,但附件中的工程编译不了。   2. Microso...

ORA-31633: unable to create master table "SCOTT.JOB2"

在用datapump导出一个表时报如下错误:

ORA-15221 11gR2 (11.2.0.1) Unable To Create ASM Spfile Standalone (文档 ID 1082332.1)

11gR2 (11.2.0.1) Unable To Create ASM Spfile Standalone (文档 ID 1082332.1) 转到底部 ...
  • loryliu
  • loryliu
  • 2016年06月06日 20:57
  • 481

spring3+struts2+JPA配置时出现 Unable to find file 警告,求解答。

2012-04-21 16:51:10,984 WARN  org.hibernate.ejb.packaging.InputStreamZippedJarVisitor.doProcessEleme...
  • YYZhQ
  • YYZhQ
  • 2012年04月21日 17:57
  • 3665

Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file 2010-08-03

在SSH2项目中启动tomcat,出现了下面的错误: 19:34:30,134 ERROR Dispatcher:27 - Dispatcher initialization failed Una...

严重: Exception starting filter struts2 --Unable to load configuration. - bean - jar:file:

严重: Exception starting filter struts2 Unable to load configuration. - bean - jar:file:/C:/Program%2...

JAR包不全!Unable to load configuration.-bean-jar:file:/.../struts2-core-2.2.1.jar!/struts-default.xml:7

JAR包不全!java web工程启动时报错:Unable to load configuration. - bean - jar:file:/D:/jars/.../struts2-core-2.2...

struts2 Unable to load file

异常如下:严重: Exception starting filter struts2 Unable to load configuration. - include - file:/D:/Progra...

ORA-09925: Unable to create audit trail file

 Oracle无法登陆,报错 ORA-09925: Unable to create audit trail file Cause: ORACLE was not able ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Unable to create '/media/sf_nginx/H2_20151103/H2/.git/index.lock': File exists.
举报原因:
原因补充:

(最多只允许输入30个字)