tell git to ignore compiled *.pyc files (and others)

You don't commit non-source files.
That's what .gitignore is for. ;)