0

I am making a Django website project. I decided to push it to my git repo but I am not sure what files I should add in .gitignore

I guess all the settings.py files are certainly not supposed to be committed to git. What other files should I ignore?

1 Answers1

1

Take a look at this .gitignore file. Normally you ignore all cache, migrations or short, .log files. Depends if you want to deploy you may also want to exclude the settings.py

ViLuWi
  • 307
  • 3
  • 19
  • But settings.py has info like db connection data and django secret key, so I guess I will ignore that too? Also, where to put this gitignore file? In my project root? – sakshamakagautam Apr 10 '21 at 10:10
  • You shouldn't ignore migrations. The whole point of migrations is to keep the database structure with the code. – Tim Nyborg Apr 10 '21 at 11:05