This recent post that made it to the front page talks a lot about approaches GitHub has taken over its history:
https://nesbitt.io/2026/02/26/git-in-postgres.html
Following another recent theme, the answer for Forgejo seems to be - just use Postgres.