简体   繁体   中英

git unable to rm --cached files

I want to remove all my *.pyc files from version control. I've tried git rm -r cached ./*.pyc but I got the error fatal: pathspec 'widgets.pyc' did not match any files . I thought widgets.pyc is not in version control but git status widgets.pyc says that my file is on branch master .

Any remedy for my problem?

试试git rm -r --cached ./\\*.pyc (注意星号前面的反斜杠字符),以确保命令shell将通配符传递给git而不是自己扩展它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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