{"id":28417802,"url":"https://github.com/rraval/git-nomad","last_synced_at":"2025-06-26T20:31:50.926Z","repository":{"id":37898016,"uuid":"370350266","full_name":"rraval/git-nomad","owner":"rraval","description":"Synchronize work-in-progress git branches in a light weight fashion","archived":false,"fork":false,"pushed_at":"2025-05-30T18:33:33.000Z","size":7184,"stargazers_count":22,"open_issues_count":8,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T13:49:00.064Z","etag":null,"topics":["git"],"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/rraval.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2021-05-24T12:49:53.000Z","updated_at":"2025-04-18T07:50:59.000Z","dependencies_parsed_at":"2023-10-24T21:27:17.862Z","dependency_job_id":"848db5f6-9fe2-4a30-914e-d3b8eeeed765","html_url":"https://github.com/rraval/git-nomad","commit_stats":{"total_commits":246,"total_committers":2,"mean_commits":123.0,"dds":"0.12195121951219512","last_synced_commit":"e13d343596e902a32b0b527284453030e2b803a1"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/rraval/git-nomad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rraval%2Fgit-nomad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rraval%2Fgit-nomad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rraval%2Fgit-nomad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rraval%2Fgit-nomad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rraval","download_url":"https://codeload.github.com/rraval/git-nomad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rraval%2Fgit-nomad/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262139589,"owners_count":23265182,"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":["git"],"created_at":"2025-06-04T08:10:29.528Z","updated_at":"2025-06-26T20:31:50.895Z","avatar_url":"https://github.com/rraval.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-nomad\n\n[![Coverage](https://img.shields.io/coveralls/github/rraval/git-nomad)](https://coveralls.io/github/rraval/git-nomad)\n[![Code Docs](https://img.shields.io/website?url=https%3A%2F%2Frraval.github.io%2Fgit-nomad%2Fdoc%2Fgit_nomad%2F\u0026label=code%20docs)](https://rraval.github.io/git-nomad/doc/git_nomad/)\n[![Issues](https://img.shields.io/github/issues/rraval/git-nomad)](https://github.com/rraval/git-nomad/issues)\n[![Latest Release](https://img.shields.io/github/v/release/rraval/git-nomad)](https://github.com/rraval/git-nomad/releases/latest)\n[![Commits since latest release](https://img.shields.io/github/commits-since/rraval/git-nomad/latest)](https://github.com/rraval/git-nomad/commits/master)\n[![License](https://img.shields.io/github/license/rraval/git-nomad)](https://github.com/rraval/git-nomad/blob/master/LICENSE)\n\nSynchronize work-in-progress git branches in a light weight fashion. Motivation:\n\n- You frequently work on the same repository from multiple machines, like a laptop and a desktop.\n- You frequently rewrite history and use short understandable-by-only-you branch names, making pushing regular branches to git remotes cumbersome.\n- You want all the efficiency and synchronization benefits of having a git clone available, meaning external syncing tools like Dropbox or network mounts are right out.\n- You want this synchronization to work out-of-the-box with popular third party remote hosts like GitHub.\n\n[![Demo](https://rraval.github.io/git-nomad/demo.svg)](https://rraval.github.io/git-nomad/demo.html)\n\n## Usage\n\n[Install `git-nomad`](#installation) to make it available on your `$PATH`.\nAssume you're hacking away with your usual git workflow:\n\n```console\nrraval@desktop:~/git-nomad$ git checkout -b feature\nrraval@desktop:~/git-nomad$ touch new_file\nrraval@desktop:~/git-nomad$ git add .\nrraval@desktop:~/git-nomad$ git commit -m \"new file\"\n```\n\nWhenever you like, you can push the state of your local branches with:\n\n```console\n# Synchronizes with a remote called `origin` by default.\n# See `--help` for overriding this explicitly.\nrraval@desktop:~/git-nomad$ git nomad sync\nPushing local branches to origin... 3s\nFetching branches from origin... 0s\nListing branches at origin... 3s\n\ndesktop\n  refs/nomad/desktop/feature -\u003e c340cd55853339e4d039746495cdb80cd9e46123\n  refs/nomad/desktop/master -\u003e 267719fb8448cc1cbef2c35a638610573779f2ac\n```\n\n---\n\nAt some future point, you wish to pick up development on a different machine:\n\n```console\nrraval@laptop:~/git-nomad$ git nomad sync\nPushing local branches to origin... 2s\nFetching branches from origin... 1s\nListing branches at origin... 2s\n\ndesktop\n  refs/nomad/desktop/feature -\u003e 1a101799507ba67d822b97105aafa0ac91ce5183\n  refs/nomad/desktop/master -\u003e 267719fb8448cc1cbef2c35a638610573779f2ac\nlaptop\n  refs/nomad/laptop/master -\u003e 267719fb8448cc1cbef2c35a638610573779f2ac\n```\n\nWhich prints out refs to use to pick up where you left off:\n\n```console\nrraval@laptop:~/git-nomad$ git checkout -b feature refs/nomad/desktop/feature\n# Hack away where you left off on desktop\n```\n\n---\n\nLet's say that the `laptop` machine is where development is happening now, so\nyou go back to `desktop` to throw away the now outdated branch:\n\n```console\nrraval@desktop:~/git-nomad$ git checkout master\nrraval@desktop:~/git-nomad$ git branch -D feature\nDeleted branch feature (was 1a10179).\n\nrraval@desktop:~/git-nomad$ git nomad sync\nPushing local branches to origin... 2s\nFetching branches from origin... 1s\nListing branches at origin... 0s\nPruning branches at origin... 0s\n  Delete refs/nomad/desktop/feature (was 1a101799507ba67d822b97105aafa0ac91ce5183)... 0s\n\ndesktop\n  refs/nomad/desktop/master -\u003e 267719fb8448cc1cbef2c35a638610573779f2ac\nlaptop\n  refs/nomad/laptop/feature -\u003e dedf3f9d3ad279a401877b351c3ec13aa47cbbd4\n  refs/nomad/laptop/master -\u003e 267719fb8448cc1cbef2c35a638610573779f2ac\n```\n\n---\n\nIf you'd like to stop using `git-nomad` and clean up all the refs it has created:\n\n```console\n# See also the `purge --host` option.\nrraval@desktop:~/git-nomad$ git nomad purge --all\nFetching branches from origin... 1s\nListing branches at origin... 0s\nPruning branches at origin... 2s\n  Delete refs/nomad/desktop/master (was 267719fb8448cc1cbef2c35a638610573779f2ac)... 0s\n  Delete refs/nomad/laptop/feature (was dedf3f9d3ad279a401877b351c3ec13aa47cbbd4)... 0s\n  Delete refs/nomad/laptop/master (was 267719fb8448cc1cbef2c35a638610573779f2ac)... 0s\n```\n\n## How it works\n\nGit is unabashedly a [content-addressed filesystem][git-cafs] that manipulates `blob`, `tree`, and `commit` objects. Layered on top of this is a half decent version control system, though this claim is contentious at best.\n\nGit branches are implemented on top of [a more general scheme called `refs`][git-refs], where the local branch `master` is simply the commit pointed to by `refs/heads/master`. Git reserves a few hierarchies for its own use:\n\n- `refs/heads/*` represent local branches.\n- `refs/tags/*` represent tags.\n- `refs/remotes/*` represent remote branches.\n\n`git-nomad` works directly with refs to implement its own light weight synchronization scheme:\n\n1. Push local `refs/heads/*` to remote `refs/nomad/{user}/{host}/*`. This allows multiple users on multiple hosts to all use `git-nomad` on the same remote without overwriting data.\n2. Fetch remote `refs/nomad/{user}/*` to local `refs/nomad/*`. This makes all the host refs for a given user available in a local clone.\n3. Prune local `refs/nomad/*` refs where the corresponding branch has been deleted.\n\nUsing refs like this has advantages:\n\n- You only pay the storage cost for the content unique to the branch. The bulk of repository history is shared!\n- As refs get cleaned up, `git`s automatic garbage collection should reclaim space.\n- Since these refs are under a separate `refs/nomad` hierarchy, they are not subject to the usual fast-forward only rules.\n\n## Installation\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/git-nomad.svg)](https://repology.org/project/git-nomad/versions)\n\n### On Linux or Mac OS X\n\nReleases on GitHub have prebuilt binary assets: https://github.com/rraval/git-nomad/releases\n\n1. Download the latest version for your OS.\n2. Place the binary somewhere in your `$PATH` named `git-nomad`.\n3. Check that things work with `git nomad --version`.\n\n### On NixOS / via Nix\n\nInstall via [nixpkgs][nixpkg]:\n\n```\n$ nix-env --install git-nomad\n```\n\n### From source\n\nIf you have [`cargo`][cargo] available:\n\n```\n$ cargo install git-nomad\n```\n\n## Bleeding Edge\n\n### Via `nix run`\n\nNix can build and run the binary directly from GitHub via:\n\n```\n$ nix run github:rraval/git-nomad\n```\n\n## Contributing\n\nThere are a few ways to make this project better:\n\n1. Try it and [file issues][new-issue] when things break. Use the `-vv` flag to capture all information about the commands that were run.\n2. Build packages for various operating systems.\n\n[cargo]: https://www.rust-lang.org/tools/install\n[git-cafs]: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects\n[git-refs]: https://git-scm.com/book/en/v2/Git-Internals-Git-References\n[new-issue]: https://github.com/rraval/git-nomad/issues/new\n[nixpkg]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/version-management/git-nomad/default.nix\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frraval%2Fgit-nomad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frraval%2Fgit-nomad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frraval%2Fgit-nomad/lists"}