Remove pycache files from github repo

--

During working on a Python project some .pyc files in __pycache__ directories appeared. Those files are just compiled version of code already in repo. It’s junk and it’s a good practice to get rid of it.

To remove it run command:

find . -name "*.pyc" -exec git rm {} \;

And add .gitignore file from here. Next time you commit changes git will automatically remove these files as well as another types of files listed in .gitignore file.

--

--

No responses yet