Compdigitec Labs

« | Home | »

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.

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Linux | 7 Comments »

7 Responses to “Deepen an existing shallow clone with git”

  1. ปากกาลดน้ำหนัก Saxenda Says:
    July 19th, 2026 at 08:11

    … [Trackback]

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

  2. ศัลยกรรมเกาหลี Says:
    July 22nd, 2026 at 11:46

    … [Trackback]

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

  3. LINKDONATE Says:
    August 20th, 2026 at 08:47

    LINKDONATE

    แนะนำเลย LINKDONATE แพลตฟอร์มโดเนทสำหรับสตรีมเมอร์ ใช้งานง่าย รองรับการโดเนทแบบเรียลไทม์

  4. สมัคร RONIN789 Says:
    September 3rd, 2026 at 11:53

    สมัคร RONIN789

    สมัคร RONIN789 เว็บตรงมั่นคงอันดับ 1 ฝากถอนไว ไม่มีขั้นต่ำ

  5. Suntikan Typhoid Says:
    September 9th, 2026 at 05:37

    … [Trackback]

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

  6. หวยงวดที่แล้ว สำคัญอย่างไร Says:
    September 11th, 2026 at 02:12

    … [Trackback]

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

  7. NANO789 เว็บตรง Says:
    September 15th, 2026 at 12:23

    NANO789 เว็บตรง

    แนะนำ NANO789 เว็บตรง ระบบออโต้ 100% เล่นง่าย จ่ายจริง

Comments