Forums

Gitignore does not ingo the __pycache__ file

I am putting into practice the tutorial https://blog.pythonanywhere.com/121/ everything works fine, but curiously I observe that .gitignore does not ignore the pycache file. I have tried deleting it before doing a new commit, but it appears again. It is not something that worries me now, but it may be interesting to notify the team in case it may be useful. In the gitignore file I have:

* .pyc
__pycache__

Greetings and see you soon

try __pycache__/

I have tried as you say putting the forward slash and saving the file, but after committing the previously deleted pycache file reappears.

Maybe the problem is related to something I specified in a previous post:

Git started in wrong directory

I'll leave it in case it can be useful, a greeting (ยจ)

If you commited stuff from __pycache__ before you added it to ignored files, it would be tracked regardless.

thanks, all fine :)

Glad to hear that you made it work!