nihal111 / MooDLD

The Moodle Downloader
Apache License 2.0
3 stars 0 forks source link

Gigantic Repo #25

Open pritambaral opened 8 years ago

pritambaral commented 8 years ago

Git stores every file in every commit. Forever. Yes, even after you git rm ...; git commit ... it later.

Git compresses text files easily, but not binary files (which have always been hard to compress).

That means, if you add a binary of size X MB to git and commit it, you've just added X MB to the git repo forever. Make a slight change to it commit it again, you've added another X MB to the repo, forever.

The only way to remove the fat, is to go back in history and modify every commit to remove the offending files. This will change the commit id of every commit including and newer than the very first offending commit, which will force everyone that has already cloned the repo to clone it all over again (or go back and erase their own local history, if they can).

TL;DR: Don't store non-text files in git, or any non-compressible file for that matter. If you did it, you'll need to rewrite git history

pritambaral commented 8 years ago

Addendum: the fat files you're storing in git should be in Github's 'Releases'