我一直在 Windows 8.1 上使用 git ,每当我尝试使用以下命令完全删除git存储库时
rm -rf .git
我遇到了错误:
rm: cannot unlink `.git/objects/pack/pack-1d2a33e057e25d7deb538366e3ef14c91a9551c8.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-34012f955a1f523f6d828416f8076a1ef0b7f6da.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-34a1ab8c950bba63f59a3e9fac66c81de3891052.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-4d509a81a88109118ed881a5f8bd8ef333f2a773.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-60e2cc3727a15201698236a201b7a75b45dab190.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-676f92fd1e3e0f25fcc68850a7cbc2f50cab388e.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-a71fc7d3a49a47d2ce1b89193bfc461b24727021.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-b105d1108006ac851715ff7d7e18f39ffbf5c978.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-b9a22b325fd18860ad1cf3974ea082a1037a085c.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-c26f6794a158c7b057a0612fa3f578964721133e.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-d7653161024d3ff938b409c7993adf7a12811102.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-ee4637aea5cbe84947dd388fa8a0eac72cd4760a.pack': Permission
denied
rm: cannot unlink `.git/objects/pack/pack-fd00786f2b5407f67aaed53e69a08ed3a807551e.pack': Permission
denied
rm: cannot remove directory `.git/objects/pack': Directory not empty
rm: cannot remove directory `.git/objects': Directory not empty
rm: cannot remove directory `.git': Directory not empty
另外,我使用以下命令授予权限,但遇到同样的问题。
chmod 777 .git
我该如何解决?请帮帮我?
答案 0 :(得分:2)
作为右侧文件夹中的Windows cmd中的管理员:
RMDIR /S /Q .git