{"id":18356023,"url":"https://github.com/ony/git-refremote","last_synced_at":"2025-09-03T18:41:48.742Z","repository":{"id":143061348,"uuid":"566086444","full_name":"ony/git-refremote","owner":"ony","description":"Manage local reference repositories to split local-only and remote git objects/packs","archived":false,"fork":false,"pushed_at":"2022-11-15T00:21:12.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-24T01:58:49.457Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/ony.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-11-14T23:55:00.000Z","updated_at":"2022-11-14T23:57:09.000Z","dependencies_parsed_at":"2023-07-14T00:15:17.845Z","dependency_job_id":null,"html_url":"https://github.com/ony/git-refremote","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ony/git-refremote","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony%2Fgit-refremote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony%2Fgit-refremote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony%2Fgit-refremote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony%2Fgit-refremote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ony","download_url":"https://codeload.github.com/ony/git-refremote/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony%2Fgit-refremote/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273492261,"owners_count":25115563,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-05T22:08:45.800Z","updated_at":"2025-09-03T18:41:48.713Z","avatar_url":"https://github.com/ony.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Idea\n\nSplit location of local-only repo part and remote duplicated part of git.\nE.g. we want to back-up but don't want to include say 2G of contnet that\nalready duplicated on remote.\n\nThings to get inspired by:\n* `git clone --reference \u003crepo\u003e \u003cremote-repo\u003e`\n\n## How it works?\n\nKeep in `$XDG_CACHE_HOME/git-refremote/references` local bare repositories for\nremotes indexed by SHA-1 on URI.\n\n`git-refremote setup` - re-fetch remote into bare repository (cache). Instruct\n`git` for current repo to fallback to that cache as if initially cloned with `--reference`.\nNote that it will perform `git gc` to remove no longer needed objects.\n\n`git-refremote clone` - first clone into bare/cache repo and then use `git clone --reference ...`.\n\n`git-refremote update` - first update bare/cache repo and then do actual `git update`.\n\n## Existing repo example\n\nIn existing git repository (e.g. nixpkgs):\n```sh\ngit-refremote setup origin  # last argument is remote name that can be omitted if only one\ndu -shx .git $(cat .git/objects/info/alternates)\n```\n```sh\n32M\t.git\n3.8G\t/home/mykola/.cache/git-refremote/references/3a/35efd4f141280f005cf892fe192b077045ab38/objects\n```\n\nCan move `~/.cache/git-refremote/references` to a different than home partition\nand symlink/bind it to free some space in home folder.\nJust don't forget to disable following symlinks during backup or exclude that\nfolder explicitly.\n\n\n## Clone repo example\n\n```sh\ngit-refremote clone https://github.com/ony/git-refremote.git\n```\n```\nCloning into bare repository '/home/mykola/.cache/git-refremote/references/b7/853f42031980fcc583bc5f8fce02a2ee72ac77'...\nremote: Enumerating objects: 15, done.\nremote: Counting objects: 100% (15/15), done.\nremote: Compressing objects: 100% (12/12), done.\nremote: Total 15 (delta 2), reused 12 (delta 2), pack-reused 0\nReceiving objects: 100% (15/15), done.\nResolving deltas: 100% (2/2), done.\nCloning into 'git-refremote'...\n```\n\nNote that it doesn't support any command line options specified before remote\nURI. Though target directory still can be specified.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fony%2Fgit-refremote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fony%2Fgit-refremote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fony%2Fgit-refremote/lists"}