我最近开始使用Cloud9 IDE。我使用Git版本控制和它做工精细,直到最近我试过这个命令:问题与Git添加
git add .
并将其与此失败,错误如下:
ubuntu:~/workspace (master) $ git add .
fatal: Unable to create '/home/ubuntu/workspace/.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.
ubuntu:~/workspace (master) $
我有sudo
权限和使用sudo
用上面的命令给了我其他的错误。索引不会更新。它仍然显示我喜欢修改,但没有添加。
疯狂的部分是,该文件.git/index.lock
不存在,也当我试图寻找是否有在后台运行,使用top
或ps grep
任何git
过程中,我找不到任何。
我在Cloud9环境中使用Ubuntu 14.04 LTS。我是RW权限的协作者之一,但我没有重新启动权限。我尝试了以下,但他们不工作:
sudo reboot
sudo shutdown -r now
请让我知道如何继续。我需要尽快部署代码。顺便说一句,这是我的第一篇文章,以及我也看到这里类似的帖子:
- Stuck on Git on Windows: Can't checkout, can't stash, can't commit
- fatal: Unable to create '/.git/index.lock': File exists
你能手动进入目录并检查文件吗?并用'sudo rm -f index.lock'删除?它通常是隐藏的。 –
@PraveenKumar号码该文件根本不存在于该位置。 –
你可以尝试使用像'ls -la'或类似的过滤器吗? –