本文介绍了无法删除目录git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#deleted:4.proste ip\305\\ \\ 202aszczyzny / draw.js
#deleted:4.proste ip\305\202aszczyzny / index.html
#deleted:4.proste ip\305\202aszczyzny / js /input.js
#deleted:4.proste ip\305\202aszczyzny / math.js
#deleted:4.proste ip\305\202aszczyzny / style.css
#deleted:proste ip\305\202aszczyzny / draw.js
#deleted:proste ip\305\202aszczyzny / index.html
#deleted: proste ip \305\202aszczyzny / js / input.js
#deleted:proste ip\305\202aszczyzny / math.js
#deleted:proste ip\305 \202aszczyzny / style.css
当我运行例如:
git rm -r 4.proste ip\305\202aszczyzny / draw.js
我得到:
致命:pat hspec'4.proste'与任何文件都不匹配
我也试过运行:
git rm $(git ls-files --deleted)
列出所有已删除的文件并将其删除。我犯了同样的错误。我的文件夹名称非常奇怪,因为名称上有波兰语字符。现在我改变了它们,但是现在我想将它们从我的回购库中删除。
git rm -r4 .proste ip\305\202aszczyzny / draw.js
I have git repo and I want to remove directories.
# deleted: "4.proste i p\305\202aszczyzny/draw.js"
# deleted: "4.proste i p\305\202aszczyzny/index.html"
# deleted: "4.proste i p\305\202aszczyzny/js/input.js"
# deleted: "4.proste i p\305\202aszczyzny/math.js"
# deleted: "4.proste i p\305\202aszczyzny/style.css"
# deleted: "proste i p\305\202aszczyzny/draw.js"
# deleted: "proste i p\305\202aszczyzny/index.html"
# deleted: "proste i p\305\202aszczyzny/js/input.js"
# deleted: "proste i p\305\202aszczyzny/math.js"
# deleted: "proste i p\305\202aszczyzny/style.css"
and when I run for example:
git rm -r 4.proste i p\305\202aszczyzny/draw.js
I get: fatal: pathspec '4.proste' did not match any files
I also tried running: git rm $(git ls-files --deleted)to list all deleted files and remove them. I get the same error. My folder names are so wierd because of polish characters in name. Now I changed them but now I want to remove them form my repo.
解决方案
In Bash, you need quotes around filenames with spaces in them to avoid the shell thinking they're separate arguments.
git rm -r "4.proste i p\305\202aszczyzny/draw.js"
这篇关于无法删除目录git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!