Skip to content Skip to sidebar Skip to footer

How Can I Prevent Django From "forgetting" Information Whenever I Make A Git Commit?

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 the chan

Solution 1:

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.

Solution 2:

Git commit cannot make things disappear nor the push command.

If I understand it right, you have your sqlite file in version control. You shouldn't do that. In that way you mess data between development and production.

Post a Comment for "How Can I Prevent Django From "forgetting" Information Whenever I Make A Git Commit?"