entireio/git-sync

🪩 Mirror git refs from a source remote to a target remote without a local checkout. Packfiles stream directly over Smart HTTP and an in-memory object store.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 5 minutes ago
Added to GitGenius on July 9th, 2026
Created on April 8th, 2026
Open Issues & Pull Requests: 5 (+0)
Number of forks: 26
Total Stargazers: 493 (+0)
Total Subscribers: 1 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.2 days
Mean response time: 2.0 days
90th percentile: 5.3 days
Tracked items: 9

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 16% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 4
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 55 days
Stale 30+ days: 4
Stale 90+ days: 4

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

git-sync is a Go-based tool for mirroring Git references and objects from a source remote to a target remote without requiring a local checkout. The core innovation is its ability to stream packfiles directly over Smart HTTP using an in-memory object store, eliminating the need for local disk storage during synchronization operations. This approach addresses a significant scaling problem: traditional Git mirroring workflows create a local mirror clone and then push to the target, which becomes a local storage bottleneck for large repositories. git-sync instead operates as a pure remote-to-remote operation with structured planning and typed JSON output for automation.

The tool provides three main command modes. The sync command mirrors source refs into the target and automatically bootstraps empty targets, making it suitable for both initial seeding and ongoing synchronization. The replicate command overwrites target refs to match the source via relay and fails rather than materializing objects locally. The plan command previews what would happen without actually pushing, using the same flags as sync.

git-sync implements two distinct transfer paths to handle different scenarios. The relay path streams pack data directly from source upload-pack into target receive-pack without holding an object graph locally, keeping memory bounded regardless of repository size. The materialized fallback path fetches needed objects into an in-memory go-git store when relay is unavailable, then encodes and pushes a packfile with memory usage guarded by an explicit object-count limit. The tool supports creating, updating, and deleting refs, force updates via the force flag, and managed ref deletion through the prune option.

The repository is written in Go and requires version 1.26 or newer. Installation is available through Homebrew for macOS and Linux, or via go install. The project maintains comprehensive documentation covering usage patterns, architecture decisions, protocol details, SHA256 conversion procedures, and testing methodologies. The library API is available for Go embedding through the stable entire.io/entire/git-sync package, with an unstable variant exposing advanced controls like Bootstrap, Fetch, and batching configuration.

The tool syncs complete Git object history for selected refs without creating shallow clones, though some planning paths may use filtered fetches. It operates as a one-shot CLI and library operation rather than a daemon, requiring external scheduling through cron, CI systems, or worker services for periodic synchronization.