报错内容:

$ git commit -m 'Test'
fatal: Unable to create 'D:/MyProject/.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 文件,将其删除,即可解决问题(如果提示不能删除文件,就重启系统)

表现形式:

提交后更改数为0,修改了文件后点击保存,更改数就会变成无。形成一种脱机现象,文件修改无效,也无法上传。

产生原因:

应该是由于git操作的时候修改了一些文件导致的操作冲突被锁住了

参考链接

Git常见问题:fatal: Unable to create index.lock File exists 错误的解决办法相关推荐

  1. 【038】使用git commit命令时遇到 fatal: Unable to create index.lock File exists 错误的解决办法

    一.问题描述 使用git commit 命令提交代码,遇到下面的错误: $ git commit -m 'Test' fatal: Unable to create 'D:/MyProject/.gi ...

  2. 使用git上传工程出现fatal:Unable to create ‘/xxx/xxx/xxx/.git/index.lock‘:File exists的解决办法

    git上传工程出现fatal:Unable to create '/xxx/xxx/xxx/.git/index.lock':File exists的原因及解决方法 先说解决办法 再来说说原因 官方说 ...

  3. fatal: Unable to create ‘D:/project/.git/index.lock‘: File exists

    git 命令行报错:fatal: Unable to create 'D:/project/.git/index.lock': File exists 出现这种错误 解决办法: //在git bash ...

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

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

  5. Unable to create '.git/index.lock': File exists

    Git – fatal: Unable to create '/.git/index.lock': File exists. fatal: Unable to create '/path/my_pro ...

  6. 使用Sourcetree进行Git操作时失败提示:Unable to create '../.git/index.lock': File exists.

    今天使用git时发现无法切换分支,也无法拉取更新代码,报错: fatal: Unable to create '-/.git/index.lock': File exists. 分析原因应该是:我在使 ...

  7. Git出现Unable to create 'E:/xxx/.git/index.lock': File exists.的解决办法

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/darlinghqq/article/d ...

  8. IDEA中对代码进行commit时,git报Unable to create ‘E:/blog/.git/index.lock‘: File exists问题解决

    IDEA中对代码进行commit时,git报Unable to create 'E:/blog/.git/index.lock': File exists问题解决 **解决方法** **方法一** * ...

  9. Git 错误 Unable to create 'E:/xxx/.git/index.lock': File exists.的解决办法

    执行commit操作的时候提示: Unable to create 'D:/git/testgit/.git/index.lock': File exists. 解决方法:rm -f .git/ind ...

  10. 解决:关于Git无法提交 index.lock File exists的问题

    问题 今天提交代码时,在一次提交,莫名其妙没成功后,再次用git commit -a命令时,出现以下错误,无论是用git还是TortoiseGit等其他客户端都会出现以下这个问题.. 错误日志 $ g ...

最新文章

  1. LeetCode-80: 删除排序数组中的重复项 II
  2. “人机大战”捧红人工智能 新时代的HPC玩家需要什么能力?
  3. 最简单的Web Service实现
  4. rsync+inotify实现实时同步案例
  5. nodejs redis 过期时间_别在为Redis面试而烦恼了?看完暴答【面试管】
  6. 数据结构 - 最小堆最大堆
  7. python局部静态变量_全局变量、局部变量和静态变量
  8. 四、华为鸿蒙HarmonyOS应用开发之Java开发下Page Ability生命周期
  9. 二维数组vector的代码使用简单例子_vector容器_ 用构造函数vectorint()
  10. c 语言调用纯汇编函数 1
  11. Codeforces 923 B. Producing Snow
  12. 【HDU2825】Wireless Password,AC自动机+状态压缩DP
  13. Mybatis新发现—在idea中数据库操作出现了异常,最好的查错助手居然是这个!
  14. 吴恩达神经网络和深度学习-学习笔记-14-学习率衰减
  15. 使用pyqt开发gui(pyqt集成到pycharm)
  16. hc-05 android 蓝牙连接,实用,教你简单使用HC05蓝牙模块及如何配对?
  17. V Rising 服务器搭建
  18. WindowsX64下pyinstaller打包code
  19. 六、HTML高级标签
  20. Managed Direct3D开发经验浅析

热门文章

  1. 获取用户的openid与遇到的errcode:40029与errcode:40125,errmsg
  2. java过滤器是用来干什么的_java过滤器有什么作用
  3. Ansys SCDM基本操作
  4. RGB HSV CMYK LAB颜色空间
  5. java出现圅_java获取汉字拼音首字母A
  6. Android中可展开的列表组件(ExpandableListView)的使用
  7. 产品管理:新产品开发流程「权威指南」
  8. 智能硬件产品开发流程梳理
  9. 关于邮箱的正则表达式
  10. linux如何撤销权限修改,linux 撤销权限