git clone only the last snapshot of a project

22 Nov 2012

Git clone by default download all the data attached to a repository, there are sometimes however when I’m only interested in getting the latest snapshot. This can be done with the –depth=1 option:

$ git clone --depth=1 git://

It’s called shallow clone