{"id":15690177,"url":"https://github.com/remram44/doublegit","last_synced_at":"2025-07-20T01:33:10.855Z","repository":{"id":34300523,"uuid":"175919486","full_name":"remram44/doublegit","owner":"remram44","description":"A command line tool to mirror a repository, logging all ref updates","archived":false,"fork":false,"pushed_at":"2023-06-14T16:10:34.000Z","size":216,"stargazers_count":8,"open_issues_count":16,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-19T11:43:23.904Z","etag":null,"topics":["archive","git","github","hacktoberfest","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remram44.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-16T03:03:00.000Z","updated_at":"2024-12-21T17:17:21.000Z","dependencies_parsed_at":"2024-10-03T18:08:18.009Z","dependency_job_id":null,"html_url":"https://github.com/remram44/doublegit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/remram44/doublegit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fdoublegit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fdoublegit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fdoublegit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fdoublegit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remram44","download_url":"https://codeload.github.com/remram44/doublegit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fdoublegit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266053832,"owners_count":23869497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archive","git","github","hacktoberfest","rust"],"created_at":"2024-10-03T18:08:08.604Z","updated_at":"2025-07-20T01:33:10.818Z","avatar_url":"https://github.com/remram44.png","language":"Rust","readme":"What is this?\n=============\n\nThis is a small tool that does `git fetch` then writes down all ref updates in a SQLite3 database. It also creates refs to make sure no commit gets garbage collected.\n\nWhat for?\n=========\n\nIf the remote repository gets force-pushed to, some commits might get lost. There will also be no evidence in the Git log that such destructive changes happened. It is also possible for a commit to be created but pushed much later, or branches can get renamed; none of this appears in the Git log either.\n\nThis tool will allow you to get a clear picture of what happened, never lose a commit, and quickly get a snapshot of a repository at a specific point in time. It is therefore more suitable for backups than a mirror.\n\nDoesn't the reflog do all that?\n===============================\n\nThis is indeed similar to Git's built-in reflog, except that the reflog isn't aware of branch renames, and a branch's reflog gets deleted with the branch.\n\nIt is also local, so you wouldn't be able to read the reflog of a remote repository.\n\nHow to use\n==========\n\nFirst, create a bare repo::\n\n```\n$ mkdir my-repo-backup \u0026\u0026 cd my-repo-backup\n$ git init --bare\n```\n\nSet up a remote `origin`:\n\n```\n$ git remote add origin https://github.com/my-name/my-repo.git\n```\n\nThen simply run doublegit once in a while:\n\n```\n$ doublegit /path/to/my-repo-backup\n```\n\nYou can then query `gitarchive.sqlite3` for branch updates or for the position of the branches at a given point in time.\n\nNext steps?\n===========\n\nI think it would be cool if this tool could record GitHub/GitLab/... API events too; things like issues/merge requests/comments.\n\nIt could also automatically backup all your starred repos.\n\nSome kind of query interface needs to be written (I'm thinking web).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremram44%2Fdoublegit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremram44%2Fdoublegit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremram44%2Fdoublegit/lists"}