---
title: "Shallow clone a old repo"
description: "If you don't need the full git history for a repo you will be working on you can supply a clone depth to only clone x revisions of the repo."
canonical: https://oozou.com/til/shallow-clone-a-old-repo-2
locale: en
date: 2020-10-13
topic: shell
---

# Shallow clone a old repo

> If you don't need the full git history for a repo you will be working on you can supply a clone depth to only clone x revisions of the repo.

Published: 2020-10-13 · Topic: [shell](https://oozou.com/til-topics/shell) ([markdown](https://oozou.com/til-topics/shell.md))

If you don't need the full git history for a repo you will be working on you can supply a clone depth to only clone x revisions of the repo.

*git clone --depth=1 https://github.com/my/repo.git*

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
