I\'d like to maintain a shallow, mirrored, bare clone of several branches. I will clone locally from that for different project branches. e.g.
+-------------
I faced this question when searching for analogous sophisticated Git needs and perfectly understand that question is 2 years old. I'm answering because there are no answers at all whereas question is still very valid.
Shallowness is primarily fetch
property. So it's possible to do fetch
with --depth 200
and maintain history without too old commits.
Modern versions of Git have --shallow-exclude
option. I think it's exactly what allows to "maintain everything since a certain commit".