We use git to distribute an operating system and keep it upto date. We can\'t distribute the full repository since it\'s too large (>2GB), so we have been using shallow clon
If you can select a specific branch, it can be even faster. Here's an example using Spark master branch and latest tag:
Initial clone
git clone git@github.com:apache/spark.git --branch master --single-branch --depth 1
Update to specific tag
git fetch --depth 1 origin tags/v1.6.0
It becomes very fast to switch tags/branch this way.