# ry git

> Deploy on push: connect an app to a GitHub repository and see what pushes did.

```text
ry git [options] [command]
```

## Subcommands

### `ry git connect`

Deploy an app on every push to a branch of a GitHub repository.

```text
ry git connect [options] [app]
```

Arguments:

- `[app]`: The app (default: "app" from rytiv.json in this directory or above).

Options:

- `--repo <owner/repo>`: The repository (default: the GitHub remote 'origin' of this directory).
- `--branch <branch>`: The branch whose pushes deploy (default: main).
- `--subdirectory <dir>`: For a monorepo: the folder that gets built.
- `--account <login>`: The connected GitHub account to use (default: the repository's owner).
- `--auto-deploy`: Deploy on every push (the default for a new link).
- `--no-auto-deploy`: Keep the link but do not deploy on push.
- `--previews`: Open a preview for pushes to other branches (the default for a new link).
- `--no-previews`: No previews for other branches.
- `--wait`: Wait for the browser even without a terminal.
- `--no-wait`: Start the GitHub connection, print the link, and return.
- `--no-browser`: Do not open a browser, just print the link.

Example:

```bash
ry git connect web --repo acme/web --branch main
```

### `ry git status`

Which repository an app follows, and what its recent pushes did - exits 1 if the newest push failed.

```text
ry git status [options] [app]
```

Arguments:

- `[app]`: The app (default: "app" from rytiv.json in this directory or above).

Options:

- `-n, --limit <n>`: How many pushes (control plane caps at 100). Default: `10`.

Example:

```bash
ry git status web
```

### `ry git disconnect`

Stop deploying an app on push (its machines keep running; the GitHub account stays connected).

```text
ry git disconnect [options] <app>
```

Example:

```bash
ry git disconnect web
```
