> ## Documentation Index
> Fetch the complete documentation index at: https://getfloo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# connect

> floo connect owner/repo: deploy an app from your own GitHub repository. An app floo hosts moves there with its history.

Make your own GitHub repository the app's source, so a push to its branch deploys dev. An app floo hosts moves there with every branch and tag.

```text theme={null}
floo connect <owner/repo> [--app <name>] [--branch <branch>]
```

Requires floo CLI v2026.11.09 or later (`floo update`).

## What it does

| The app | What `floo connect` does |
| - | - |
| floo hosts its code | Pushes every branch and tag of the hosted repository into `owner/repo` with your own git credentials, switches the app to it, archives the hosted repository, and points this folder's git remotes for it at `owner/repo` |
| Deploys from another GitHub repository, or from none | Switches the app to `owner/repo` and builds its newest commit |
| Doesn't exist yet | Creates it on `owner/repo` and builds its newest commit |

The app's URLs, env vars and databases stay as they are.

A move needs an empty repository: create one first with `gh repo create owner/repo --private`. floo moves the history only into an empty repository, so nothing already there is overwritten. If a move stops partway, run the same command again: it pushes whatever is missing and finishes.

The floo GitHub App must be able to read `owner/repo`. If it can't, `floo connect` stops before anything moves and prints the link that fixes it. See [GitHub access](https://getfloo.com/docs/cli/github.md).

## Flags

| Flag | Description |
| - | - |
| `--app APP`, `-a` | App name or UUID. Without it, the app comes from `floo.app.toml` in the current folder, then the repository's name |
| `--branch BRANCH` | The branch that deploys dev. Defaults to the app's current branch, then `main` |
| `--json` | Print the result as JSON, with `remotes_repointed` and `remotes_removed` |

## Examples

```bash theme={null}
# Move the app floo hosts for this folder to your own repository
gh repo create acme/storefront --private
floo connect acme/storefront

# Another app
floo connect acme/storefront --app shop

# Deploy dev from trunk
floo connect acme/storefront --branch trunk
```

An app with a prod release keeps serving it. Its next release is a GitHub release on `owner/repo`.

## API

`floo connect` pushes the history, then calls [`PUT /v1/apps/{app_id}/source`](https://api.getfloo.com/openapi.json) with `{"kind": "github", "repo": "owner/name"}`. For an app floo hosts, the call refuses with `HOSTED_HISTORY_NOT_PUSHED` until every branch and tag of the hosted repository is in the new one.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.