## Deepen an existing shallow clone with git

By admin | January 31, 2012

In git, the new revolutionary DVCS system, to shallow clone a repository means to check out only the latest snapshot of a git repository, unlike a normal clone which pulls the entire repository. A shallow git repository can save bandwidth and take up less space.

git clone --depth=1 git://repo.example.com/mycoolapp

However, let’s say that once you checkout the project, compile it and decide that you want to contribute to it, then a shallow clone would probably not suffice. In this case, one can deepen the repository by using the following command inside the git repository, where n = number of revisions to deepen to:

git fetch --depth=n origin master

Saves more than having to re-clone everything from scratch and lose your working tree.

Topics: Linux | 8 Comments »

### 8 Responses to “Deepen an existing shallow clone with git”

1. dewaqq daftar Says:
November 8th, 2021 at 12:02

[…] There you will find 7195 additional Info to that Topic: compdigitec.com/labs/2012/01/31/deepen-an-existing-shallow-clone-with-git/ […]

2. good shop dumps Says:
November 17th, 2021 at 17:23

[…] Read More on that Topic: compdigitec.com/labs/2012/01/31/deepen-an-existing-shallow-clone-with-git/ […]

3. relx Says:
December 27th, 2021 at 19:05

[…] Read More on that Topic: compdigitec.com/labs/2012/01/31/deepen-an-existing-shallow-clone-with-git/ […]

4. cancer hemp oil Says:
December 28th, 2021 at 03:23

5. kardinal stick Says:
January 1st, 2022 at 18:59

[…] There you can find 5183 more Information to that Topic: compdigitec.com/labs/2012/01/31/deepen-an-existing-shallow-clone-with-git/ […]

6. 토토사이트 Says:
January 7th, 2022 at 12:11

7. medical marijuana for sale Says:
January 13th, 2022 at 10:50