问题描述:今天在使用 git add *** 文件时,由于文件较大,费时较长,因此中途关闭了git,但是在后来的上传过程中出现了问题,提示如下:
使用git命令时遇到 fatal: Unable to create index.lock File exists
fatal: Unable to create 'D:\微信小程序\HTML+CSS+JSs/.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 文件,删除!即可解决问题。
(这个大概是因为 git 一些失误操作冲突被锁住了)