简体   繁体   English

如何删除git存储库中引用的已删除文件

[英]How to remove quoted deleted files in git repository

when I use git status, it shows: 当我使用git status时,它显示:

# Changes not staged for commit:
#   (use "git add/rm <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   deleted:    "project/Resources/font-365\345\211\257\346\234\254.png"

how to use git rm to remove it? 如何使用git rm删除它? I have tried: 我努力了:

git rm project/Resources/font-365\\345\\211\\257\\346\\234\\254.png
git rm \"project/Resources/font-365\\345\\211\\257\\346\\234\\254.png\"

they don't work 他们不工作

I got a method how to solve it, using: git commit -am "done" this way, the git delete all the files that are not staged and do the commit 我有一个解决方法,使用:git commit -am“ done”这样,git删除所有未暂存的文件并执行提交

but it is not a elegant way I think, does anyone know how to delete it using "git rm"? 但是我认为这不是一种优雅的方法,有人知道如何使用“ git rm”将其删除吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM