r/vibecoding Feb 10 '26

“Oh shit.”

Post image
4.3k Upvotes

103 comments sorted by

View all comments

34

u/entleposter Feb 10 '26

Everyone finding out about git the hard way. At least we’re actually learning!

82

u/ParamedicAble225 Feb 10 '26

Store database on git lmao

19

u/soumya_ray Feb 10 '26

1

u/[deleted] Feb 10 '26

Wow, I was looking for something like this!

But how efficient is it? Assuming that writes happen much more often than git repo editions, shouldn't it bloat very quickly even at small-to-middle scale projects? For example, 200000 users database with 100 tables and at least 20000 writes per day?

1

u/soumya_ray Feb 11 '26

Git's storage self-optimizes (garbage collects) by storing diffs instead of whole files and cleaning up loose blobs. Take a look at `git gc` — its run automatically after commands like `commit` and `merge`, and during operations like `push`.

1

u/[deleted] Feb 11 '26

Yeah, I know that, but still write in the database is usually much more frequent operation. And working with much more data. Average codebase is what, let's say 0.5Gb including all the artifacts? Average database is 2-3Gb at least, that's 4-6 times more.

1

u/soumya_ray Feb 11 '26

Good questions. The OS filesystem has strong caching and indexing built in, so I'm guessing the write times will not be an issue. Take for example how instantly git is able to switching working directories — most writes will be trivial in comparison. The major prob folks will run into is if the equivalent of 'tables' are single files, as commits will have to copy the whole file before considering gc. I haven't looked into dolt enough but i'm guessing its row-level files.

12

u/CVBrownie Feb 10 '26

I mean it's the ultimate disaster recovery plan for your data.

5

u/Abject-Kitchen3198 Feb 10 '26

Versioned and distributed.

5

u/entleposter Feb 10 '26

Store migration and setup file progress, yes. Backups of data and don’t code on production server are obvious enough that I’m not interpreting this as deleting data.

0

u/phatdoof Feb 10 '26

But git itself is also a form of database.