[英]How to delete a single git repository clone, without the rm -rf sledgehammer?
[英]How to remove .git directory when rm -rf fails?
我正在嘗試通過運行來刪除與項目關聯的 git 文件:
[#]: rm -rf .git
我得到以下結果:
rm: cannot remove ‘.git/hooks’: Directory not empty
查看.git/hooks
我試圖查看ls -l
那里有什么,但我得到了這個奇怪的響應:
ls: cannot access commit-msg.sample: No such file or directory
ls: cannot access pre-rebase.sample: No such file or directory
ls: cannot access applypatch-msg.sample: No such file or directory
ls: cannot access pre-commit.sample: No such file or directory
ls: cannot access update.sample: No such file or directory
ls: cannot access pre-applypatch.sample: No such file or directory
ls: cannot access post-update.sample: No such file or directory
applypatch-msg.sample pre-applypatch.sample update.sample
commit-msg.sample pre-commit.sample
post-update.sample pre-rebase.sample
我試圖單獨刪除這些文件,但也不起作用。 例如:
[#]: rm applypatch-msg.sample
rm: cannot remove ‘applypatch-msg.sample’: No such file or directory
如何從項目中刪除這個 git 目錄?
我正在嘗試通過運行來刪除與項目關聯的 git 文件:
[#]: rm -rf .git
我得到以下結果:
rm: cannot remove ‘.git/hooks’: Directory not empty
查看.git/hooks
我試圖查看ls -l
那里有什么,但我得到了這個奇怪的響應:
ls: cannot access commit-msg.sample: No such file or directory
ls: cannot access pre-rebase.sample: No such file or directory
ls: cannot access applypatch-msg.sample: No such file or directory
ls: cannot access pre-commit.sample: No such file or directory
ls: cannot access update.sample: No such file or directory
ls: cannot access pre-applypatch.sample: No such file or directory
ls: cannot access post-update.sample: No such file or directory
applypatch-msg.sample pre-applypatch.sample update.sample
commit-msg.sample pre-commit.sample
post-update.sample pre-rebase.sample
我試圖單獨刪除這些文件,但也不起作用。 例如:
[#]: rm applypatch-msg.sample
rm: cannot remove ‘applypatch-msg.sample’: No such file or directory
如何從項目中刪除這個 git 目錄?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.