3b1b / videos

Code for the manim-generated scenes used in 3blue1brown videos
5.81k stars 1.55k forks source link

Remove pyc blobs and DS_Store from history #4

Closed nihaals closed 3 years ago

nihaals commented 3 years ago

Blocked by #3

Currently, cloning the repo can be quite slow. This is probably because of the Python bytecode blobs that were originally added (but later removed). As these are still in the commit history, the repo is still bloated. Using something like BFG you could remove all the remnants of both the *.pyc and the .DS_Store files. As this repo is unlikely to get large code-based external PRs, rewriting history shouldn't have an effect on others. Note that BFG doesn't clean the HEAD commit but all commits before it so there would need to be a non-ignored-removing commit before using it.

Example:

git clone --mirror https://github.com/3b1b/videos.git
bfg --delete-files '{.DS_Store,*.pyc}' videos.git
cd videos.git
git reflog expire --expire=now --all
git gc --prune=now --aggressive
git push --force

After doing this it is recommended to delete your other (previous) clones and run git clone again.

3b1b commented 3 years ago

Thanks for addressing this.