GIT提交代码出错File exists.

Posted sweetbullet

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了GIT提交代码出错File exists.相关的知识,希望对你有一定的参考价值。

今天合并代码的时候执行了 git status   出现了下面的执行命令
no changes added to commit (use "git add" and/or "git commit -a")
执行了 git add

就报下面的错误了


fatal: Unable to create ‘D:/3.0项目和资料/3.0项目/fanuc-部署项目/frame-static/.git/index.lock‘: File exists. Another git process seems to be running in this repository, e.g. an editor opened by ‘git commit‘. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.

 

百度了解决方案

在当前的git bash下执行 

 rm -f ./.Git/index.lock

然后正常保存本地提交就行了

 











以上是关于GIT提交代码出错File exists.的主要内容,如果未能解决你的问题,请参考以下文章

git学习解决git提交代码时报错: Unable to create ‘XXX/.git/index.lock‘: File exists.

git学习解决git提交代码时报错: Unable to create ‘XXX/.git/index.lock‘: File exists.

Git-解释“Swap file .MERGE_MSG.swp already exists”的问题

存储库已锁定 - 尝试提交源代码控制时出错

git pull失败提示fatal: Unable to create 'E:/job/tpaas-web/.git/index.lock': File exists.

php代码片段: sendFile/videoStream/sendEmail/phpexcel/ffmpeg/zip