Git Shallow Clone

If you git clone a repository it brings in the entire repository which contains every revision of every file ever made. Sometimes this is overkill. This can especially be true if you’re checking into a repository for Continuous Integration or Continuous Delivery. You wouldn’t need every single iteration of a file but rather only the latest. In this case git clone shallow comes in handy.

git clone --depth 1 https://github.com/jquery/jquery.git

As mentioned in our clone single-branch post you can also just bring in a single branch that you specify for an even lighter clone:

git clone --single-branch -b master -n git@github.com:nodejs/node.git --depth 1

Read more about it here

Instagram Post