The __pycache__
directory is annoying when working with git updates. Whenever I use git status
, a lot of .pyc files show up. How can I conveniently list the __pycache__
folder in my .gitignore
file so that they won't show up when using git status
?
For example:
core/__pycache__/utils.cpython-36.pyc
core/__pycache__/version.cpython-36.pyc
core/actions/__pycache__/__init__.cpython-36.pyc
core/actions/__pycache__/action.cpython-36.pyc
Do I have to list all the individual __pycache__
files into the gitignore file?
*,pyc
files in some existing commits. These existing commits can never be changed—those pycache files are in them forever. You can make new commits that are like the old commits, but don't have the*.pyc
files in them, and switch to using the new commits and never use the old ones ever again, which is viable as long as other people on the project also switch over.