Fearless Git for Agents

Disposable Gitea servers for AI experimentation

Every throwaway commit an agent makes lands on your real GitHub

AI agents experiment by doing constant git work — branches, commits, issues, PRs. By default all of it hits production infrastructure.

That burns API rate limits and clutters real repos with noise nobody asked for. So what if the workspace were disposable instead?

amplifier-bundle-gitea is a real, shipped answer — not a proposal

A working CLI living in the microsoft org: 988 lines of Python across 8 source files, backed by a real test suite.

It ships as both a standalone CLI and an Amplifier bundle skill. Here is how it works.

988
lines of Python · 8 src files
7
CLI commands
38
tests across 5 files
19
commits on upstream/main

One command stands up a disposable, self-contained Gitea container

No external database: SQLite, offline mode, and a hardcoded admin account (admin/admin1234). Actions, packages, and the repo-indexer are disabled.

Creation POSTs an admin API token, returned in plaintext exactly once. Now the empty sandbox needs the real repo.

mirror-from-github copies git content only — and that part is fast

By default it copies full history and all branches, typically a few seconds. The expensive metadata stays off unless you ask for it.

Six opt-in --include-* flags (all default False) add issues, PRs, labels, milestones, releases, or wiki — which can take several minutes.

The Catch

Isolation is only useful if the good work can escape

An agent can now branch, commit, and open PRs freely inside the throwaway server. But an experiment trapped in a server you're about to delete is wasted work.

The open question the whole loop has to answer: how does value get out — without dragging the mess back with it?

promote-to-github pushes just the branch you chose — and opens one real PR

Only the deliberate, finished branch leaves the sandbox. github_sync.promote() pushes it from Gitea to GitHub and creates a single pull request.

Never the experimental noise — just the one result you meant to ship. One thing is left to clean up.

# resolve the GitHub token, then push + open the PR # --github-token → GH_TOKEN → `gh auth token` promote-to-github --branch my-work # Push a branch from Gitea to GitHub # and create a pull request.

Then destroy throws the entire server away — one clean PR remains

The full loop runs: mirror the repo, experiment hard in isolation, promote the good branch, then delete the whole disposable server.

Real GitHub is left untouched — except for the single pull request you chose to open.

mirror experiment promote destroy
The Pattern

Make the workspace disposable, not the repo

Mirror the real repo, experiment freely, promote only the good branch, and throw the rest away. The server is cheap; the production repo stays clean.

Fearless experimentation for agents — with zero production residue.

Sources

Research Methodology

Status: SHIPPED

Repo: microsoft/amplifier-bundle-gitea · checkout /tmp/gitea-src · HEAD 732b18c on upstream/main, dated 2026-06-03. Migrated into the microsoft org on 2026-03-23.

Commands run:

Primary contributors: David Koleczek (13 commits) · Brian Krabach (4) · Salil Das (2).

Gaps: The README's transitive-foundation inclusion chain is quoted but was not independently traced across repos — treat as a documented claim, not a verified fact. 27 material claims checked; 0 unsupported.

More Amplifier Stories