# Just realized that I need to add db.sqlite3 to gitignore file

**URL:** <https://forum.djangoproject.com/t/just-realized-that-i-need-to-add-db-sqlite3-to-gitignore-file/9662>\
**Category:** Using Django\
**Created:** [September 11, 2021, 4:01am UTC](https://forum.djangoproject.com/t/just-realized-that-i-need-to-add-db-sqlite3-to-gitignore-file/9662 "2021-09-11T04:01:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vicrost](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/vicrost/32/4837_2.png) [@vicrost](https://forum.djangoproject.com/u/vicrost)\
**Post date:** [September 11, 2021, 4:01am UTC](https://forum.djangoproject.com/t/just-realized-that-i-need-to-add-db-sqlite3-to-gitignore-file/9662/1 "2021-09-11T04:01:44Z")

</div>

I just found out that I should not be commiting and pushing my sqlite3 database my github repository. My website is already live and I’ve made many push and pull calls between local and production servers.  
The answers I found on stackoverflow suggest I run ` git rm --cached db.sqlite` then add it to the gitignore.  
Is this the right way and also I want to know the implications of doing this to my production database. Will I now have to re create all the objects in my models (user accounts, images, blog posts,etc) in the production server?

---

<div class="post-metadata">

**Author:** ![jlgimeno](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/jlgimeno/32/284_2.png) [@jlgimeno](https://forum.djangoproject.com/u/jlgimeno)\
**Post date:** [September 11, 2021, 4:10am UTC](https://forum.djangoproject.com/t/just-realized-that-i-need-to-add-db-sqlite3-to-gitignore-file/9662/2 "2021-09-11T04:10:04Z")

</div>

Yes, `git rm --cached db.sqlite3` is the way to remove the database from source control. It’s a good idea in general to keep the production database isolated from your development environment. If you need test data locally to develop features, there’s a couple of ways to populate that part of the database.

-Jorge
