# Git clone without entire history

**URL:** <https://linux-tips.com/t/git-clone-without-entire-history/403>\
**Category:** Shell\
**Created:** [September 12, 2016, 8:28pm UTC](https://linux-tips.com/t/git-clone-without-entire-history/403 "2016-09-12T20:28:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg](https://linux-tips.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@Greg](https://linux-tips.com/u/Greg)\
**Post date:** [September 12, 2016, 8:28pm UTC](https://linux-tips.com/t/git-clone-without-entire-history/403/1 "2016-09-12T20:28:17Z")

</div>

Is it possible to clone a git repository without fetching entire history?

---

<div class="post-metadata">

**Author:** ![RaskoX](https://linux-tips.com/user_avatar/linux-tips.com/raskox/32/92_2.png) [@RaskoX](https://linux-tips.com/u/RaskoX)\
**Post date:** [September 12, 2016, 8:39pm UTC](https://linux-tips.com/t/git-clone-without-entire-history/403/2 "2016-09-12T20:39:25Z")

</div>

Yes, it is possible with providing `--depth` option to `git` command as below:

```auto
$ git clone --depth 1 git@github.com:torvalds/linux.git

```

If you choose **1** for the _depth_ value, it will copy only the latest revision of everything in the repository.

In past, only disadvantages of this schema, if you clone the repository by this way, it is not possible to make new commits and push them into the repository again.

But git version **1.9** and above, this is not an issue anymore. You can clone a git repository with _depth_ option and make new commits on it.
