Since thisThis functionality is not directly supported by Git. However, try at least ayou can use git gc
, or the more recent (Git 2.30+) git maintenance
to decrease the repo size.
git maintenance run --task gc
git maintenance run --task loose-objects --task incremental-repack
ThatThis won't be your initial statethe same as re-cloning the repo, but it should be smallerresult in a smaller repo.