# How Do I Clone All Remote Branches?

To clone all remote branches from a Git repository, you can use the `--mirror` option with `git clone`. Here's how you can do it:

```bash
git clone --mirror <repository-url>
```

Replace `<repository-url>` with the URL of the Git repository you want to clone.

This command will create a bare repository on your local machine that contains all remote branches, tags, and commits from the original repository.

Once you have cloned the repository, you can navigate into it and convert it to a regular repository by removing the `--mirror` option.

```bash
cd <repository-name>
git config --unset core.bare
```

This converts the cloned repository from a bare repository to a regular repository, allowing you to work with it as usual.

### Note:

- Cloning all remote branches can result in a large repository size, especially if the repository has many branches and commits. Make sure you have enough disk space available.
- If you only need to clone specific branches, you can use the `-single-branch` option followed by the branch name when cloning the repository. This will only clone the specified branch and its history.
- Be mindful of the repository's size and your network bandwidth when cloning large repositories.