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://

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. Legal Gun Sites Says:
    February 5th, 2022 at 20:22

    … [Trackback]

    […] Find More on that Topic: […]

  2. nova88 Says:
    March 31st, 2022 at 10:03

    … [Trackback]

    […] Read More on that Topic: […]

  3. Belle Mature A Sant'agnello Incontri Says:
    April 14th, 2022 at 21:45

    … [Trackback]

    […] Find More on that Topic: […]

  4. ล่องเรือเจ้าพระยา Says:
    May 1st, 2022 at 18:45

    … [Trackback]

    […] Information on that Topic: […]

  5. dumps pin sites Says:
    May 23rd, 2022 at 02:00

    … [Trackback]

    […] There you will find 93827 more Information on that Topic: […]

  6. คาสิโนออนไลน์ Says:
    June 1st, 2022 at 04:27

    … [Trackback]

    […] Read More Info here on that Topic: […]

  7. genotropin pris Says:
    June 30th, 2022 at 07:23

    … [Trackback]

    […] Find More here to that Topic: […]