# GitHub

URL: /systems/integrations/github · Id: `page:systems/integrations/github`

> Connect a GitHub repository to a Startup's code, either as a mirror of db.sb or as the place you edit, with every change reviewed, evaluated and deployed.

A [Startup](/business/nouns/startup)'s code and definitions live in [Repositories](/code/systems/repositories), inside [db.sb](/code/platform/db-sb). Connect GitHub when you or a developer want to work there; nothing requires it.

## Pick a direction
| Direction | Sync | Use it when |
| --- | --- | --- |
| db-first | `mirror` | You build by asking your agent, and want a readable copy on GitHub. Git is rebuilt from db.sb. |
| git-first | `import` | A developer works in GitHub. Each commit arrives as a [Change](/business/nouns/change). |

Either way db.sb stays the record, so the agent and the developer never edit two copies.

## From commit to live
A commit pushed to GitHub arrives as a Change on its branch. It passes the Startup's [Evals](/agents/evals-system) before [`Change.merge`](/business/nouns/change/merge) lands it. [`Version.deploy`](/business/nouns/version/deploy) ships it as a new [Version](/business/nouns/version), and the previous Version stays one [`Change.revert`](/business/nouns/change/revert) away.

## Guides
| You say | What your agent does |
| --- | --- |
| "Connect the GitHub repo" | Calls [`Integration.connect`](/business/nouns/integration/connect); you approve the grants on GitHub. |
| "Check this change before it merges" | Calls [`Change.review`](/business/nouns/change/review) and posts the result on the Change. |
| "Undo the last deploy" | Calls `Change.revert` and deploys the Version before it. |
| "Disconnect GitHub" | Calls [`Integration.revoke`](/business/nouns/integration/revoke); the code stays in db.sb. |

GitHub sees code and repository metadata only, as the [subprocessors](/systems/trust-and-governance/subprocessors) list states. [Ship my changes](/code/ship-my-changes) is the guide for the full loop.