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
I don't know if it suites your set-up but what I use is to have ha full clone of a repo in a separate directory. Then I do shallow clone from the remote repository with reference to the local one.
git clone --depth 1 --reference /path/to/local/clone git@some.com/group/repo.git
That way only the differences with the reference repository and remote are actually fetched. To make it even quicker you can use the --shared
option, but be sure to read about the restrictions in the git
documentation (it can be dangerous).
Also I found out that in some circumstances when the remote has changed a lot, the clone starts fetching too much data. It is good to break it then and update the reference repo (which strangely takes much less bandwidth than it took in the first place.) And then start the clone again.