# 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: Intermediate | Time: 1 hour | Basis: From the README

Use graft clone and graft sparse so an agent fetches only the paths it will edit.

**Who it is for:** A developer whose coding agent works on one part of a large repository and should not download the whole history.

**The problem:** Full clones of large repositories are slow for short agent tasks that touch only a few files.

**The outcome:** A workspace that holds only the requested paths, with the agent able to read and change them.

### Steps

1. Complete the build from the first use case so the graft CLI exists in `_build/bin`.
2. Run `./_build/bin/graft` to list the commands and find the clone and sparse subcommands. (inferred, check the README)
3. Run `./_build/bin/graft clone` against your running server with the path options that the command help shows. (inferred, check the README)
4. Run `./_build/bin/graft sparse` to narrow the workspace to the paths the agent needs. (inferred, check the README)
5. Check that the workspace contains only the requested paths before handing it to the agent.

### Prompt to paste into your agent

```text
In the repository git-ai, run `./_build/bin/graft` and read the help for the clone and sparse commands. Create a sparse workspace for <target-path> on the running server and verify that only that path appears in the working tree.
```

### Caveat

The README names graft clone and graft sparse but does not document their exact options, so check the command help before use.

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/
