2 How to Remove Unwanted Files from a Remote Repository

To remove the .pyc files (or any other file type for that matter) from a repository, first remove them locally:

find . -name "*.pyc" -delete

Then commit that change:

git add -A
git commit -m "Removed .pyc files"

See that commit that you just made locally by doing:

git log

Finally, just send that change to the remote repository:

git push origin master