Accidentally, I have pushed the .pyc files to the master repository. Now I want to delete them but I can´t do it. Is there any way to remove them directly from the Bitbucket sit
I used simeg's solution but also wanted to deleted tons of *.pyc files added by mistake to a branch. I used awk to delete them from cache recursively.
git status | awk '{if($1=="modified:" && $2!=".gitignore") ; system("git rm --cached "$2)}'
Then, I deleted the files from my local
find . -name *.pyc -delete