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?
Try
git rm -r --cached ./\*.pyc(note the backslash character before the asterisk) to ensure your command shell passes the wildcard character to git instead of expanding it itself.