s
Nov. 1, 2023, 6:53 p.m. |

Simon Willison's Weblog simonwillison.net

Tracking SQLite Database Changes in Git


A neat trick from Garrit Franke that I hadn't seen before: you can teach "git diff" how to display human readable versions of the differences between binary files with a specific extension using the following:

git config diff.sqlite3.binary true
git config diff.sqlite3.textconv "echo .dump | sqlite3"

That way you can store binary files in your repo but still get back SQL diffs to compare them.

I still worry about the efficiency of storing binary …

binary database diff differences echo extension files git human sqlite tracking trick versions

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Machine Learning Engineer

@ Apple | Sunnyvale, California, United States