我最近开始使用Cloud9 IDE。我使用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不存在,而且当我试图查找是否有git进程在后台运行时,使用top或ps grep,我找不到任何文件。
我在Cloud9环境中使用Ubuntu14.04LTS。我是RW许可的合作者之一,但我没有重启权限。我试过以下几种方法,但它们不起作用:
sudo reboot
sudo shutdown -r now请告诉我该怎么做。我需要尽快部署代码。顺便说一句,这是我的第一篇文章,我也在这里看到过类似的帖子:
发布于 2016-04-28 11:06:48
试着使用:
sudo chmod 755 -R .git
sudo chown -R ubuntu:root .git如果文件不存在,则为真。在我看来是个许可问题。
https://stackoverflow.com/questions/36912682
复制相似问题