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

时间:2013-06-07 09:01:50

标签: git quotes rm

当我使用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"

如何使用git rm删除它? 我试过了:

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\"

它们不起作用

1 个答案:

答案 0 :(得分:0)

我有一个方法如何解决它,使用:     git commit -am“done” 这样,git删除所有未暂存的文件并执行提交

但我认为这不是一种优雅的方式,有没有人知道如何使用“git rm”将其删除?