'Git Ignore All __pycache__ Directory [duplicate]

I just follow this solution to add __pycache__/ in my .gitignore but it doesn't work. All directory with format __pycache__ still appear in my git status

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source