But hey, if there's a different kind of database that you think would be better here, I'd be fascinated to see it. Just make sure that it can
1. handle major structural changes to the files being tracked (e.g. JSON schema revisions)
2. store and retrieve these changes as efficiently as git
3. do the above with as little work required by the user
Good luck!
Essentially I was using the commit log as the point of truth for the data, and building a database as an ephemeral asset derived from that data.
If the point of truth is the git repository and its history, then the SQLite database that you build from it is essentially a fancy caching layer - just like if you were to populate a memcached or redis instance or build an Elasticsearch index.
I've built track-changes-over-times things in relational databases before and it's a real pain to implement!
I've actually started using a GitHub repository to back up the PostgreSQL database that powers my blog, because it's a really cheap way of getting a revision history of that database without having to write any extra code: https://github.com/simonw/simonwillisonblog-backup/commits/m...
But if the data is already in a textual format where [or which can be canonicalized so that] each line is an atomic unit, Git + existing common diff tools get you a lot with very little work and are resilient to schema changes.
You could also reduce the data to EAV triples and do a change-tracking DB for that, wwhich would get you immunity to schema changes at the cost of losing all the value that a tracking DB has for known-schema data.
So, really, I'd say Git is the easy & general solution, though a DB might be worth the extra work if the schema was known to be fixed.
It seems to me that if the goal is to track changes over time, git is very well suited to that.
The main difference between git and a traditional DB is querying and relationships between fields