# FR: Expose git-mirrors code as a sub-command?

**URL:** <https://forum.buildkite.community/t/fr-expose-git-mirrors-code-as-a-sub-command/925>\
**Category:** Features Requests\
**Created:** [February 21, 2020, 10:30am UTC](https://forum.buildkite.community/t/fr-expose-git-mirrors-code-as-a-sub-command/925 "2020-02-21T10:30:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![petemounce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/petemounce/32/339_2.png) [@petemounce](https://forum.buildkite.community/u/petemounce)\
**Post date:** [February 21, 2020, 10:30am UTC](https://forum.buildkite.community/t/fr-expose-git-mirrors-code-as-a-sub-command/925/1 "2020-02-21T10:30:02Z")

</div>

I sometimes have builds that need to clone other git repos. I want those to be as fast as the git-mirrors feature that buildkite thoughtfully provide because waiting for things costs compute and engineering-time.

I would find it exceedingly useful if there were a buildkite-agent checkout-with-mirror sub-command which would allow me to do that clone via the git-mirrors experiment that the BK agent has, since building that inside bash is a pain especially since I already know it exists within BK.

That might look like

```auto
buildkite-agent checkout <git URL>
  --git-mirrors-path (defaults to same environment variable as in `--start`/config)
  --git-clone-flags (defaults to same environment variable as in `--start`/config)

```

Alternatively, allow a step to clone multiple repos…?

```auto
...
command: foo/build.sh
additional_repos:
  git:
    git@github.com:my-org/foo.git:
      into: foo
      depth: 1
...

```

---

<div class="post-metadata">

**Author:** ![petemounce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/petemounce/32/339_2.png) [@petemounce](https://forum.buildkite.community/u/petemounce)\
**Post date:** [June 2, 2020, 8:45pm UTC](https://forum.buildkite.community/t/fr-expose-git-mirrors-code-as-a-sub-command/925/2 "2020-06-02T20:45:09Z")

</div>

@pda friendly ping from [https://buildkite-community.slack.com/archives/CBJ41LW22/p1582613103001800?thread\_ts=1582034136.006100&cid=CBJ41LW22](https://buildkite-community.slack.com/archives/CBJ41LW22/p1582613103001800?thread_ts=1582034136.006100&cid=CBJ41LW22) ?
