Remove Unwanted Files From Git History
Here's an example of how to remove every *.pyc file from every commit in Git history. It is adapted from this Git help page.
Rewrite history
Run git filter-branch, forcing (--force) Git to process—but not check out (--index-filter)—the entire history of every branch and tag (--tag-name-filter cat -- --all …