I always forget this ...
To recursively remove all those pesky .pyc files from a git repo, run this command:
$ find . -name "*.pyc" -exec git rm -f {} \;
Then make sure to add a .gitignore in the root of the repo and add the line: *.pyc
python-scripts/scripts/01_remove_all_pyc.md at master · realpython/python-scripts
executable file
·
9 lines (6 loc) · 257 Bytes
I always forget this ...
To recursively remove all those pesky .pyc files from a git repo, run this command:
$ find . -name "*.pyc" -exec git rm -f {} \;
Then make sure to add a .gitignore in the root of the repo and add the line: *.pyc