赞
踩
一、问题描述
使用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 文件,将其删除,即可解决问题。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。