# AI use cases for Git AI (feder-cr/git-ai)

Repo: [feder-cr/git-ai](https://github.com/feder-cr/git-ai) | Use cases: 4 | Page: https://dedupedai.com/use-cases/feder-cr-git-ai/

gitai is an open-source Git server and CLI, written in Go, built so many AI coding agents can read, write and land code on the same repositories at the same time.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run a local gitai server for concurrent agent lands: https://dedupedai.com/use-cases/feder-cr-git-ai/run-local-server-for-many-agents/
- Land conflicting agent changes with a deterministic resolver: https://dedupedai.com/use-cases/feder-cr-git-ai/land-conflicting-agent-changes-automatically/
- Move repository state into SQLite or PostgreSQL and object storage: https://dedupedai.com/use-cases/feder-cr-git-ai/move-repository-state-to-database-and-object-storage/
- Give an agent a sparse checkout of only the paths it needs: https://dedupedai.com/use-cases/feder-cr-git-ai/work-in-a-sparse-checkout-of-a-large-repo/

## How to run a local gitai server for concurrent agent lands with Git AI

Repo: [feder-cr/git-ai](https://github.com/feder-cr/git-ai) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Build gitai and run the quickstart to see several agents land changes on one branch.

**Who it is for:** A developer or platform engineer who wants to test how a shared repository behaves when many coding agents push small changes at once.

**The problem:** Classic Git hosting makes many short-lived agent changes queue up, retry and rebase, which slows everything down on busy branches.

**The outcome:** A running gitai server, a cache daemon, two demo agents and a completed land, all in a temporary directory, with the CLI available for further commands.

### Steps

1. `git clone https://github.com/feder-cr/git-ai.git`
2. `cd git-ai`
3. `make build`
4. `examples/graft/quickstart.sh`
5. `./_build/bin/graft`

### Prompt to paste into your agent

```text
In the repository git-ai, run `make build` and then `examples/graft/quickstart.sh`. Confirm the script reports a completed land from two agents, then run `./_build/bin/graft` and report the list of commands it prints.
```

### Caveat

The README calls gitai version 0.3.0 and says interfaces may still change before 1.0, and it is an independent implementation not affiliated with Anthropic.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/feder-cr-git-ai/run-local-server-for-many-agents/

## How to land conflicting agent changes with a deterministic resolver with Git AI

Repo: [feder-cr/git-ai](https://github.com/feder-cr/git-ai) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Use the bundled resolve.toml rules so conflicting agent lands get resolved and verified.

**Who it is for:** A team lead running several coding agents on one branch, where the agents often edit the same files and conflicts block their work.

**The problem:** Conflicting lands are returned to the agent that made them, which adds retries and manual cleanup across many changes.

**The outcome:** Conflicts that match the configured deterministic rules are resolved and the changes land, with verification run on the exact tree that would land when you enable it.

### Steps

1. Complete the build and quickstart from the first use case.
2. Read `examples/graft/demo/resolve.toml` and list the rules it sets for the conflicts you expect.
3. Set `verify.command` and `verify.enabled` in your server configuration to match your project tests, following the configuration reference in doc/graft/CONFIGURATION.md.
4. Run `examples/graft/demo/acceptance-phase4.sh` to reproduce the benchmark with the deterministic resolver.
5. Compare the number of landed changes with the conflict count reported by the script.

### Prompt to paste into your agent

```text
In the repository git-ai, open examples/graft/demo/resolve.toml and summarize its deterministic rules. Then run `examples/graft/demo/acceptance-phase4.sh` and expected output is a count of landed changes; verify that it reports all 250 changes landed when the resolver is enabled.
```

### Caveat

A model based resolution only lands when the verify.command you configure passes, so the verification commands must be set by you and tested on your project.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/feder-cr-git-ai/land-conflicting-agent-changes-automatically/

## How to move repository state into SQLite or PostgreSQL and object storage with Git AI

Repo: [feder-cr/git-ai](https://github.com/feder-cr/git-ai) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Add a graft storage section, import in shadow mode, then switch to authoritative.

**Who it is for:** A platform engineer who needs to run several gitai server nodes that scale out and share one consistent state.

**The problem:** Local Git repositories on one machine cannot be shared safely by several server nodes handling many agents.

**The outcome:** Repository state is kept in a database with a changeset log and packs live in object storage, and any server node can rebuild its cache.

### Steps

1. Read doc/graft/STORAGE.md for the storage core design and the supported database and object storage options.
2. Copy `examples/graft/config.toml` and adapt it for your server.
3. Add a `[graft.storage]` section and start in `shadow` mode.
4. Import your repositories while the server runs in shadow mode.
5. Switch the storage mode to `authoritative` as described in doc/graft/STORAGE.md.

### Prompt to paste into your agent

```text
In the repository git-ai, read doc/graft/STORAGE.md and list the storage modes and the supported database and object storage backends. Start the server with `_build/bin/gitaly serve config.toml` using your storage section, and confirm the server runs in shadow mode before any switch.
```

### Caveat

The README lists garbage collection of packs in the storage core as a known gap, so storage will grow until that is handled.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/feder-cr-git-ai/move-repository-state-to-database-and-object-storage/

## How to give an agent a sparse checkout of only the paths it needs with Git AI

Repo: [feder-cr/git-ai](https://github.com/feder-cr/git-ai) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Clone through the graft CLI and materialize just the folders the agent will edit.

**Who it is for:** A team running many coding agents against one large repository.

**The problem:** Full clones of a big repo waste disk, time and agent context.

**The outcome:** A workspace that contains only the requested paths, fetched on demand from the server.

### Steps

1. Build with `make build` and try `examples/graft/quickstart.sh` to see a server, cache and two agents
2. Run `./_build/bin/graft` to see the CLI and its commands
3. Clone with graft clone against your server, then narrow it with graft sparse to the paths the agent needs
4. Check the working tree holds only those paths before handing it to the agent

### Prompt to paste into your agent

```text
In feder-cr/git-ai, run the quickstart, then create a sparse workspace with graft clone and graft sparse for <paths>. Verify only those paths are in the working tree.
```

### Caveat

Exact options for clone and sparse are in the Quickstart doc; check the command help before scripting.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/feder-cr-git-ai/work-in-a-sparse-checkout-of-a-large-repo/
