Search code examples
gitgitignore

How to ignore a folder in a folder on GitHub?


In my project I have a folder where inside it there's another folder (and some other files I want to push), called __pycache__. How do I ignore the __pycache__ folder but not the files inside the folder that contains the __pycache__ folder?


Solution

  • You can just add this to your .gitignore file

    parentFolder/__pycache__/