How do I convert an existing *Git* repo to a treeless clone?

72 Views Asked by At

I have a few big repos, that were cloned to build packages. I'd like to reduce their sizes.

I know I can do a treeless clone instead, via GITFLAGS="--filter=tree:0". However I have backup snapshots.

I'd like to run this on existing repos, to avoid introducing any new files. How do I do this?

(Note this setting breaks builds of some packages, that have parts that point to particular commits.)

0

There are 0 best solutions below