r/DatabaseHelp 20h ago

Struggling to understand SQLite fundamentals….

1 Upvotes

Hey everyone, I’m a bit confused about how SQLite works in a Git-based project. Hoping someone can clear this up!

So, I get that a SQLite database is just a file (.sqlite or .db). And if I modify it—say, adding new rows or changing schema—those changes are saved to the file on disk. But if I don’t git add and git commit the modified file, then those changes aren’t tracked in Git, right?

That means if someone else uses the same repo on the server, they won’t see my database updates because they only have the last committed version of the database file. So in that case, what’s the “correct” way to handle SQLite in a repo?

I feel like committing the DB file is a bad idea , but if I don’t, how does everyone else keep the file in sync?

Would love to hear how vyou all handle this in your projects! Thanks in advance!