4

I want to store (small) sqlite database files as plaintext in my git repos. The goal is to make it easier to use traditional version-control features (easy-to-grok diffs, mergeability, ...) on such files. I have seen this approach thus far:

git config filter.sqlite3.clean 'sqlite3 %f .dump'
git config filter.sqlite3.smudge 'sqlite3 %f'
echo '*.db filter=sqlite3' >> .git/info/attributes

Is this a viable option? What are the failure modes? What are the costs? What other options exist?

Update: This causes weird checkout problems. Avoid it unless you're quite proficient with git.

HappyFace
  • 3,439
  • 2
  • 24
  • 43

0 Answers0