git-sync
git-sync is a tool that mirrors Git refs from a source remote to a target remote without requiring a local checkout. It uses an in-memory object store and direct smart HTTP communication to stream data efficiently. The tool is designed for scalable, automated, and structured remote-to-remote Git synchronization.
- ▪git-sync transfers complete Git object history required for selected refs, not shallow clones.
- ▪It supports one-way synchronization, including ref creation, updates, force pushes, and deletions.
- ▪The tool streams packfiles directly between remotes when possible, avoiding local storage overhead.
- ▪git-sync provides typed JSON output for automation and can be used as a Go library.
- ▪It is available via Homebrew, Go install, or building from source, requiring Go 1.26 or newer.
Opening excerpt (first ~120 words) tap to expand
git-sync git-sync mirrors refs from a source remote to a target remote without creating a local checkout. It uses an in-memory go-git object store and talks smart HTTP directly: info/refs ref advertisement for source and target upload-pack fetch from source with target tip hashes advertised as have receive-pack push to target with explicit ref update commands and a streamed packfile That keeps the target side incremental without fetching target objects into the local process first. Why This Exists Mirroring Git data between remotes usually means a local mirror clone followed by a mirror push. That's fine for small repos but turns a remote-to-remote operation into a local storage problem at scale, and shell glue around git fetch / git push tends to skip planning and structured output.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.