MrMartin MrMartin - 10 months ago 59
Git Question

Remove .pyc files from Git remote repository

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 site?

Thanks in advance.

  1. Remove .pyc files using git rm *.pyc. If this not work use git rm -f *.pyc
  2. Commit git commit -a -m 'all pyc files removed'
  3. Push git push
  4. In future commits you can ignore .pyc files by creating a .gitignore file