Git – Untrack pyc files from source control

Why do we need to do this? What is a pyc file?
Python automatically compiles script to compiled code before execute it. Doing this will help your script run more smooth. And because this is automatically generated files, there is no use to commit a pyc file to your project’s source control.

$ find . -name '*.pyc' | xargs -n 1 git rm --cached

Leave a Reply

Your email address will not be published. Required fields are marked *