Fast Git clone using shallow cloning

If you want to get a read only copy of a Git repository quickly you can do a shallow clone. To make a shallow clone use argument --depth 1 along with git command line version.

    git clone  --depth 1
When doing a shallow clone with depth of 1, it tells Git to fetch only latest revision of a repository. Normal clone fetches entire history of a Git repository. As per Git documentation, you cannot clone or fetch from it, nor push from nor into it.

Shallow clone is useful when you have a slow network connection or you want to save on the network usage.


Popular posts from this blog

java.util.logging - Bad level value for property: org.openqa.level

Downloading source code from SVN/Git repository over HTTP

Suppressing JExcel warnings