我删除了一些文件,git状态如下图所示。
我已经承诺并努力了。
GitHub仍然在存储库中显示已删除的文件。如何删除GitHub存储库中的文件?
# On branch master
# 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: modules/welcome/language/english/kaimonokago_lang.php
# deleted: modules/welcome/language/french/kaimonokago_lang.php
# deleted: modules/welcome/language/german/kaimonokago_lang.php
# deleted: modules/welcome/language/norwegian/kaimonokago_lang.php
如果我使用git rm
,它会给出以下结果。
usage: git rm [options] [--] <file>...
-n, --dry-run dry run
-q, --quiet do not list removed files
--cached only remove from the index
-f, --force override the up-to-date check
-r allow recursive removal
--ignore-unmatch exit with a zero status even if nothing matched