# Shallow git clone?

**URL:** <https://community.codefresh.io/t/shallow-git-clone/479>\
**Category:** Pipeline Steps\
**Created:** [December 10, 2020, 4:51pm UTC](https://community.codefresh.io/t/shallow-git-clone/479 "2020-12-10T16:51:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joshua\_Dickerson](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/joshua_dickerson/32/313_2.png) [@Joshua\_Dickerson](https://community.codefresh.io/u/Joshua_Dickerson)\
**Post date:** [December 10, 2020, 4:51pm UTC](https://community.codefresh.io/t/shallow-git-clone/479/1 "2020-12-10T16:51:33Z")

</div>

Does the git clone step do a shallow clone? It takes 30 seconds to do a clone. When I run a clone locally, that’s how long it takes for a non-shallow clone.

There’s probably nobody using CF that wants to clone the entire git repo. All we want is the head.

If CF is cloning the entire repo, can a flag be added (or just change the default behavior) so that it is doing a shallow clone? Or, maybe an option for the depth?

It’s really simple to implement `-–depth 1`.

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [December 11, 2020, 10:45am UTC](https://community.codefresh.io/t/shallow-git-clone/479/2 "2020-12-11T10:45:23Z")

</div>

Hello Joshua

Yes of course you are right. We are aware of this and it is already in the backlog. I will ask our engineering for an update.

In the meantime, as a temporary workaround you can use git manually like any other step:

> **[Using Custom Git commands](https://codefresh.io/docs/docs/yaml-examples/examples/git-checkout-custom/#cloning-with-the-git-executable)**
>
> Clone manually git repositories

Welcome to the Codefresh community!

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [January 12, 2023, 7:04am UTC](https://community.codefresh.io/t/shallow-git-clone/479/3 "2023-01-12T07:04:37Z")

</div>

Hello

This has now been implemented [Git-Clone · Codefresh | Docs](https://codefresh.io/docs/docs/codefresh-yaml/steps/git-clone/#usage)

There is a new “depth” option in the git clone step.
