-1

When I put "git status" I get this:

    main/__pycache__/wsgi.cpython-36.pyc
    posting/__pycache__/views.cpython-36.pyc

I tried putting this in my .gitignore file:

main/__pycache__/
posting/__pycache__/

But, did not work

Ladiv
  • 3
  • 2
  • 2
    Simply putting `__pycache__/` should ignore all of them. If you already have pushed those directories onto your repository, you might want to delete them first. – Charly May 17 '21 at 19:22
  • 2
    If the files are tracked already, adding them to `.gitignore` has no effect. – eftshift0 May 17 '21 at 19:23

1 Answers1

0

Just add __pycache__/ to your .gitignore. It iwll then ignore all __pycache__ directories within your project.

schilli
  • 1,700
  • 1
  • 9
  • 17
  • thanks everybody. I deleted the pycache directory and then I put in .gitignore __pycache__/ and It works – Ladiv May 17 '21 at 20:56