nathanshelly / .files

.💙
16 stars 8 forks source link

Speed up clone by removing heavy assets from git history #110

Open nathanshelly opened 3 years ago

nathanshelly commented 3 years ago

A recent clone showed that this repo's history has grown over time to ~15 MiB:

❯ gh repo clone .files
Cloning into '.files'...
remote: Enumerating objects: 372, done.
remote: Counting objects: 100% (372/372), done.
remote: Compressing objects: 100% (194/194), done.
remote: Total 9810 (delta 209), reused 326 (delta 177), pack-reused 9438
Receiving objects: 100% (9810/9810), 14.91 MiB | 274.00 KiB/s, done.
Resolving deltas: 100% (5695/5695), done.

Running the script from this SO answer shows that most of these heavy assets either no longer exist in the repo (like images previously stored in infra/assets or fonts that have moved to https://github.com/natasha-codes/fonts) or are third-party assets that I don't need/want to store in my git tree (e.g. images from Alfred preferences).

Use the BFG repo cleaner to remove these artifacts and speed up future clones.