How can I prevent Django from “forgetting” information whenever I make a Git commit?

前端 未结 2 1293
别那么骄傲
别那么骄傲 2021-01-07 15:54

I am working on a blog project in Django that I currently have a version running in production. I have been making changes to the Development version and as I push through t

2条回答
  •  耶瑟儿~
    2021-01-07 16:04

    add a .gitignore file to your repo, add the line *.sqlite3 to it, run the following git rm --cached *.sqlite3

    Your entire database is in the sqlite file. You have one in dev that is currently tracked by your repo. Every time you make a change in dev and commit, it overwrites your prod database with your dev database.

提交回复
热议问题