【发布时间】:2016-08-09 01:33:03
【问题描述】:
我的存储库位于git。在本地副本(我的系统)中,我对其中一个文件进行了一些更改。
我尝试将该文件更新到git 存储库。为此,我正在运行以下命令:
git commit -a "text file updated"
但我收到如下错误:
$ git commit -a
fatal: Unable to create 'D:/Projects/gitProjects/color-palette/.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或本地机器上。你能解释一下这里到底有什么问题吗? -
我猜锁定文件已损坏。删除它(或按照我的建议将其移动以进行备份和恢复)可能会解决问题
-
这是我的 repo
https://github.com/3gwebtrain/color-palette- 在该文件嵌套删除的位置? -
问题出在您本地克隆的存储库中,而不是在服务器上。锁定文件仅存在于您的本地驱动器中
标签: git github git-commit