我从本地仓库中删除了Python的 .pyc 文件,但我错误地认为我是从远程 GitHub 仓库中删除的。
我将所有更改推送到了仓库,这些文件仍然存在于仓库中,但不在我的本地机器上。如何从 GitHub 仓库中删除这些文件?
我尝试过以下方法:
git rm classes/file.pyc
git add .
git
甚至还有:
git rm --cached classes/file.pyc
然后我尝试检出文件时就会遇到这个错误。
enter code here`error: pathspec 'classes/redis_ha.pyc' did not match any file(s) known to git.
我现在不知道该怎么办了。目前我的git库已经完全损坏。
git rm
之后有执行过git commit
和git push
吗? - Wooble