{"repo":"earthcomfy/db-git","free":true,"listed":false,"github":"https://github.com/earthcomfy/db-git","clone":"git clone https://github.com/earthcomfy/db-git.git","description":"Keep your database in sync with your git branches.","language":"Python","stars":11,"topics":["cli","database","database-branching","devtools","git","postgresql"],"license":"MIT","category":"databases-storage","readme_excerpt":"db-git Keep your database in sync with your git branches. db-git is a developer tool for projects where database state follows code changes: schema migrations, seed data, experimental feature work, and branch switching during reviews. It installs a git post-checkout hook and keeps your local database aligned with the branch you are working on. Status: PostgreSQL is supported today; support for additional database engines is planned. Features - Automatic database handling on git checkout - Two workflows: - shared : one database, saved and restored per branch - per-branch : one database per branch - PostgreSQL support today, with plans for more database backends - Two PostgreSQL snapshot strategies: - template : fast database clones using CREATE DATABASE ... TEMPLATE - pgdump : portable snapshots using pg dump and pg restore - Manual save , restore , create , reset , list , status , and prune commands - Safe hook behavior: checkout is never blocked by db-git failures - Rich terminal output and local state stored under .git/db-git/ Quick Start Run this from inside a git repository: Interactive init will ask: - Whether to use shared or per-branch mode - Whether to use template or pgdump strategy - What to do when active connections block database operations - Whether to install the git post-checkout hook After setup, switch branches normally: In shared mode, db-git saves the previous branch database and restores the new branch snapshot if one exists. In per-branch mode, db-git cr","default_branch":null,"files":null,"tree":[],"storefront":"/r/earthcomfy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/earthcomfy/db-git/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}