# `infrahubctl branch`

Manage the branches in a remote Infrahub instance.

List, create, merge, rebase ..

**Usage**:

```console
$ infrahubctl branch [OPTIONS] COMMAND [ARGS]...
```

**Options**:

* `--install-completion`: Install completion for the current shell.
* `--show-completion`: Show completion for the current shell, to copy it or customize the installation.
* `--help`: Show this message and exit.

**Commands**:

* `list`: List all existing branches.
* `create`: Create a new branch.
* `delete`: Delete a branch.
* `rebase`: Rebase a Branch with main.
* `merge`: Merge a Branch with main.
* `validate`: Validate if a branch has some conflict and...
* `report`: Generate branch cleanup status report.

## `infrahubctl branch list`

List all existing branches.

**Usage**:

```console
$ infrahubctl branch list [OPTIONS]
```

**Options**:

* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch create`

Create a new branch.

**Usage**:

```console
$ infrahubctl branch create [OPTIONS] BRANCH_NAME
```

**Arguments**:

* `BRANCH_NAME`: Name of the branch to create  [required]

**Options**:

* `--description TEXT`: Description of the branch
* `--sync-with-git / --no-sync-with-git`: Extend the branch to Git and have Infrahub create the branch in connected repositories.  [default: no-sync-with-git]
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch delete`

Delete a branch.

**Usage**:

```console
$ infrahubctl branch delete [OPTIONS] BRANCH_NAME
```

**Arguments**:

* `BRANCH_NAME`: [required]

**Options**:

* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch rebase`

Rebase a Branch with main.

**Usage**:

```console
$ infrahubctl branch rebase [OPTIONS] BRANCH_NAME
```

**Arguments**:

* `BRANCH_NAME`: [required]

**Options**:

* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch merge`

Merge a Branch with main.

**Usage**:

```console
$ infrahubctl branch merge [OPTIONS] BRANCH_NAME
```

**Arguments**:

* `BRANCH_NAME`: [required]

**Options**:

* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch validate`

Validate if a branch has some conflict and is passing all the tests (NOT IMPLEMENTED YET).

**Usage**:

```console
$ infrahubctl branch validate [OPTIONS] BRANCH_NAME
```

**Arguments**:

* `BRANCH_NAME`: [required]

**Options**:

* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch report`

Generate branch cleanup status report.

**Usage**:

```console
$ infrahubctl branch report [OPTIONS] BRANCH_NAME
```

**Arguments**:

* `BRANCH_NAME`: Branch name to generate report for  [required]

**Options**:

* `--update-diff`: Update diff before generating report
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.
