feder-cr/git-ai
Server-centric Git for sparse agent workspaces and batched branch updates
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
gitai is a Go fork of Gitaly that keeps ordinary Git repositories underneath and adds a server-centric workflow called Graft. Agents and CI use the graft CLI or Go SDK over gRPC, optionally through graft-cache. The server handles object retrieval, landing, changesets, derived history, search, and review. UserLand rebases a change onto the current branch tip and uses a per-reference compare-and-swap (CAS); concurrent lands on the same branch can share one reference update.
The storage core separates metadata from Git payloads. SQLite for single-node operation or PostgreSQL holds references, the changeset write-ahead log, changelog, and review state; content-addressed packs go to file-backed storage, S3, GCS, or Azure. With the storage core authoritative, local Git repositories serve as rebuildable caches. go.mod targets Go 1.26.0 and includes the Google Cloud Storage, Azure Blob, and AWS S3 SDKs. Conflict resolution is an extension point with a versioned, provider-neutral protocol rather than an embedded model runtime.
Key Capabilities & Differentiators
ObjectService serves individual objects and sparse trees. Blame, path history, and ancestry run on the server and are memoized per commit; code search runs there without an index. Clients can list or watch the ordered log of accepted reference updates. Conflicts can go to a deterministic tool or an external model, or be returned to the agent. A model proposal lands automatically only if verify.command passes on the exact candidate tree; otherwise the agent receives the conflict package with the proposal. For deterministic rules, exact-tree verification is optional. Separately, graft-verify tests the landed tip, bisects failures, and can revert the culprit.
In two runs on one 16-core machine using the v0.3.0 tree, 50 agents submitted 250 changes to one branch with 20% intentional conflicts. Against the same server with batching disabled, batching without a resolver landed 200 changes versus 100–106, at 1,487–1,944 versus 264–385 lands/min, with p99 latency of 1.9–2.7 s versus 4.4–5.2 s. The demo's deterministic resolver landed all 250 changes in that workload. This is a comparison of landing strategies on one server, not a hosting-provider comparison or a v0.4.2 performance measurement.
Trade-offs & Limitations
Compared with conventional clone-and-push Git hosting, gitai moves repeated reads and contention handling to the server. That fits short-lived workers sharing hot branches; it offers less to teams that depend on offline work or rarely contend on writes. CAS batching handles contention, but it does not make conflicting edits safe to merge. Index-free search avoids operating an index, but shifts search work to query time. Most upstream Gitaly RPCs keep working, though authoritative mode refuses some mutators, so existing write integrations need regression tests before a migration.
A horizontally scaled deployment means operating PostgreSQL, object storage, and rebuildable repository caches together. Multi-node tests share one physical machine; separate-host behavior has not been tested. File and in-memory buckets are exercised, but S3, GCS, and Azure are untested. Pack garbage collection is off by default, so operators need a retention and reclamation plan. The code is MIT-licensed, but pre-1.0 interfaces can still change. The practical adoption question is whether measured improvements on busy branches justify taking ownership of the storage and recovery path.
Hardware & Deployment Guide
The source build targets Linux or macOS and requires Go 1.26, a C toolchain, Meson, and Ninja to compile bundled Git. make build puts the server, CLI, and tools in _build/bin. examples/graft/quickstart.sh runs a temporary server, cache daemon, and two-agent landing demo. For self-hosting, adapt examples/graft/config.toml and run _build/bin/gitaly serve config.toml. Bring the storage core up in [graft.storage] shadow mode, import the repositories, then switch to authoritative after checking existing write paths. The server itself needs no model API.
v0.4.0 added graft repo create and SDK repository creation, and blocked agents from writing server-owned references. v0.4.1 brought access-policy reloads: validate with graft policy check before reloading via SIGUSR1. v0.4.2 fixes storage-core correctness issues, including a case where a rejected push update could be recorded in the database, and moves bundled Git to v2.56.0. For a rollout, start with a single-node SQLite and file-backed pilot; validate PostgreSQL, the chosen bucket, and recovery on the intended topology before treating a multi-host deployment as ready.
graft clone and graft sparse, and an optional graft-cache daemon.UserLand rebases onto the current tip and batches concurrent lands into a single compare-and-swap reference update.verify.command on the exact tree before automatic landing.graft-verify can test the tip, bisect a failure, and revert the culprit.Platform teams running many short-lived coding agents or CI workers against shared hot branches, where checkout traffic and write retries are measurable costs and the team can own storage and recovery.
Conventional Git hosting already meets your needs, offline-first work is essential, or you require proven cross-host and cloud-bucket operation without running your own qualification.
Quick Start & Installation
git clone https://github.com/feder-cr/git-ai.git cd git-ai make build # server, CLI and tools into _build/bin examples/graft/quickstart.sh # a server, a cache daemon, two agents and a land, in a temporary directory ./_build/bin/graft # the CLI and its commands
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| git-ai ★ | 935 | +25 | Go | — | Server-centric Git for sparse agent workspaces and batched branch updates |
| herdr | 54.1k | +871 | Rust | Apache-2.0 | Rust terminal multiplexer for persistent, multi-machine coding-agent workspaces |
| magpie | 45.5k | +2.9k | Go | MIT | A local API gateway that pools model subscriptions across coding agents |
| cc-switch | 159.1k | +1.7k | Rust | MIT | Tauri desktop manager for AI coding providers, local routing, and MCP config |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/feder-cr/git-ai.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about git-ai
How do agent workspaces connect, and can existing Gitaly clients still write?
graft CLI and Go SDK talk to the server over gRPC, optionally through graft-cache. graft clone and graft sparse materialize selected paths, while UserLand rebases and lands a change against the current branch tip. Existing Gitaly RPCs are generally retained, but authoritative mode refuses some upstream write operations. Test those integrations before migrating.Does gitai need a GPU, and how should I size a deployment?
Can a company self-host gitai and use it commercially?
NOTICE for bundled components. If you connect an external resolver, review its data-handling terms separately before routing conflict material to it.When should I choose gitai over conventional Git hosting?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy