Clone and push a Swarmfile repository with git
Until now, Swarmfile's answer to git was "keep your host, point Git-LFS here." That is still the right answer for a lot of teams. It isn't the only one anymore: a repository can now serve a real git remote, so you can clone it, work in it, and push back - without a git host in the middle.
Turn it on, clone it#
Git access is a per-repository switch you can turn on but not off: the repository menu in the web app, Repository settings → Git access in the Desktop App, or swarmfile git enable. (One-way is deliberate: the conversion rules freeze so commit ids never change under an existing clone.) Once it is on, every desktop installer ships the git-remote-swarmfile helper, so:
git clone swarmfile://acme/website
gives you every non-empty branch and tag as git history, commits and authors intact. Every clone of the same commit on every machine computes the same commit id, and a commit you push comes back byte-identical to anyone who fetches it. Files of 1 MiB or more come through as git-LFS pointers served by the repository itself (the clone is configured to fetch them, so a fresh clone has its binary content too), and executable files stay executable in both directions.
Push, with the guardrails stated up front#
git push is fast-forward only, and it tells you what that means instead of letting you discover it at the wrong moment:
- Merges land. If a merge brings history Swarmfile has not seen, the push sends that side history to an auto-created
merged/<first 12 characters of its newest commit>branch first, lands the merge, and archives the side branch once the merge exists. - A protected branch never moves directly. Your commits go to
push/<branch>/<sha>and the push opens a merge request into the protected branch. - Lightweight tags push, move and delete (
git push --force origin <tag>,git push origin :refs/tags/<tag>); a tag a release was published from is locked. - Large commits are handled, not refused. A commit changing more than 5,000 paths is uploaded in parts and applied as one commit, resumable if the push is interrupted; if someone else lands a change mid-apply, the applied files stay as uncommitted changes and the web app offers a rollback.
- Refused, by design: a non-fast-forward push (the helper never rewrites history), end-to-end-encrypted repositories, and direct remotes over HTTPS on the hub (an operator can run the read-only gateway for stock public clones). Annotated and signed tags are carried as their exact objects, an octopus merge is accepted when every parent after the second is already on Swarmfile, and submodule gitlinks keep their target commit id. A repository whose tree your credential cannot fully read is refused too, rather than cloned with silent holes.
The helper prints its reason when it refuses, and it names who can fix it. Shallow clones work (--depth); --shallow-since and --shallow-exclude do not. swarmfile git index confirms commits on your branch that no fetch has confirmed yet, which is what makes a pushed commit's id final.
Which path is yours#
If your repository is mostly source with a few large assets, the git-LFS path is still lighter: keep your host, point its LFS at Swarmfile, change nothing else. Clone-and-push is for the repository that already lives here - the game repo whose textures and levels are on the drive, the dataset repo, or a coding-agent fleet where every agent mounts the same repository. The full behavior, including credential recipes for CI, is in Cloning a Repository with Git.