一、问题描述 【使用git commit命令时遇到 fatal: Unable to create index.lock File exists 错误的解决办法】使用git commit 命令提交代码,遇到下面的错误:
$ 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 文件,将其删除,即可解决问题。
解决办法参考 这个问答 里面 Ryan S 的回答。
推荐阅读
- transformer|Swin-Transformer代码讲解-Video Swin-Transformer
- git使用技巧备忘(持续更新。。。)
- git 高级操作
- 同步GIT仓库的操作 -- pull命令
- git|git简单命令
- Git|Tomcat 自定义错误页面(例如404页面等等)
- 本地项目添加到gitee仓库管理
- centos|搭建Git服务器
- Git clone~fatal: protocol '?http' is not supported。解决办法。
- github开通,史上最全demo集合,各种demo持续更新中