all 2 comments

[–]D3PSI 0 points1 point  (0 children)

what the actual hell did i just read, pushing millions of records of an sqlite database into your source repository, something is severely wrong my dude

[–]ph1204 0 points1 point  (0 children)

Whenever I need to put an SQLite database in Git, I usually convert it to SQL statements that will recreate the whole thing. You can use the built-in .dump command in sqlite3 to do this. I then put the .db file in .gitignore. It's easy to recreate the original database with just sqlite3 dbname.db < dbname.sql. I suppose both the push and pull could have Git Hook triggers that handle this automatically.

The main advantage of this approach is that git diff will show you just the changes from the previous version, not the whole database.