我试图从我的本地机器上删除整个 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
- 结果相同。帮我删除那个文件夹。
最佳答案
chmod -R 777 folder
rm -rf folder
关于git - 试图删除 ubuntu guest 上的 git repo,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23207566/