日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發布時間:2024/2/28 编程问答 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Unable to create '/media/sf_nginx/H2_20151103/H2/.git/index.lock': File exists. 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.


今天不知怎么回事,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 create '/media/sf_nginx/H2_20151103/H2/.git/index.lock': File exists.的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。