【发布时间】:2014-06-06 02:49:54
【问题描述】:
我正在尝试从我的本地机器中删除整个 git 存储库,但 git 禁止删除多个文件。
我试过了:
rm -r folder- 它问我是否要删除一些写保护的文件?我问过
y。 -
出现以下消息:
rm: cannot remove ‘.git/objects/08/fa4fcd8413b84a1605e1c4866cb2493daf4c4e’: Operation not permitted rm: cannot remove ‘.git/objects/96/de4fe9aa42239290cae341427649f2afbdab16’: Operation not permitted rm: cannot remove ‘.git/objects/fd/ed37600b5fe66e1a0d0e4355b387e56ca2638e’: Operation not permitted rm: cannot remove ‘.git/objects/pack/pack-cb277ab3b4a3510209a9784a76760e6281da5218.idx’: Operation not permitted rm: cannot remove ‘.git/objects/pack/pack-cb277ab3b4a3510209a9784a76760e6281da5218.pack’: Operation not permitted
ls 命令显示所有本地文件都已删除。然后我从该文件夹中尝试了sudo rm -r .git - 结果相同。
帮我删除那个文件夹。
【问题讨论】:
-
使用
ls -la检查确切的权限 -
仅供参考:与美国的某些流行文化相反,
dat不是一个词。 -
这些文件是在网络共享上,还是一些不寻常的非磁盘挂载?否则,我看不出
sudo rm -r怎么会失败。 -
它安装在 ubuntu 上。我创建了一个文件夹,其中包含带有该 repo 的文件夹,在 windows(主机)和 ubuntu(来宾)之间共享。我正在为此目的使用虚拟盒子。
标签: git ubuntu virtualbox ubuntu-13.04