# lizard git

リンクされたプロジェクトとそのサービスの GitHub 接続を管理します。

<span id="usage" />

## 使い方

```bash
lizard git connect
lizard git status
lizard git checkout <service> <branch> [flags]
```

<span id="subcommands" />

## サブコマンド

### `lizard git connect`

GitHub App を接続してプライベートリポジトリにアクセスします。

### `lizard git status`

GitHub 接続とリポジトリのステータスを表示します。

### `lizard git checkout <service> <branch>`

サービスを別のブランチに切り替えて再デプロイします。

| フラグ | 説明 |
|------|-------------|
| `--detach` | ログのストリーミングをスキップ |

<span id="examples" />

## 例

<span id="connect-the-github-app" />

### GitHub App を接続する

```bash
lizard git connect
```

<span id="check-connection-and-repository-status" />

### 接続とリポジトリのステータスを確認する

```bash
lizard git status
```

<span id="switch-a-service-to-a-different-branch" />

### サービスを別のブランチに切り替える

```bash
lizard git checkout api staging
```

<span id="switch-branches-without-streaming-logs" />

### ログをストリーミングせずにブランチを切り替える

```bash
lizard git checkout api staging --detach
```

<span id="see-also" />

## 関連項目

- [GitHub からデプロイ](https://lizard.build/ja/docs/deploy/github) — リポジトリの接続、push 時の自動再デプロイ、モノレポの設定
- [lizard add](https://lizard.build/ja/docs/cli/add) — GitHub リポジトリからサービスを作成
