[Solved]-Django settings.cpython-36.pyc not ignored by gitignore

24👍

I was facing the same problem.

  1. First, make sure that you don’t have any changes to commit;
  2. Edit or create your .gitignore and put the follow code:

*.log

*.pot

*.pyc

*/*/*/__pycache__/

*/*/__pycache__/

*/__pycache__/

  1. Save -> git add . -> git commit
  2. ‘Clean Git Hub Cache’ for your repo:

git rm -rf –cached .

git add .

  1. Commit and it’s done!

I hope that this can help you.

0👍

add these to your gitignore and try it will work

*.pyc
*/*/*/__pycache__/
*/*/__pycache__/
*/__pycache__/

0👍

I recommend you use this in your project.django project sample .gitignore file

Leave a comment