---
title: glab repo mirror
stage: Create
group: Code Review
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---

<!--
This documentation is auto generated by a script.
Please do not edit this file directly. Run `make gen-docs` instead.
-->

Mirror a project or repository to the specified location, using pull or push methods.

```plaintext
glab repo mirror [ID | URL | PATH] [flags]
```

## Options

```plaintext
      --allow-divergence          Determines if divergent refs are skipped.
      --direction string          Mirror direction. Options: pull, push. (default "pull")
      --enabled                   Determines if the mirror is enabled. (default true)
      --protected-branches-only   Determines if only protected branches are mirrored.
      --url string                The target URL to which the repository is mirrored.
```

## Options inherited from parent commands

```plaintext
  -h, --help   Show help for this command.
```
