'How do you fix a massive `.git` folder (2Gb+)?

The project I'm working on involves some large files (eg. Jupyter notebooks, some data files, some pickled objects) - and over time the .git folder has become very large.

Right now it's at 2.1Gb, but the trajectory is clear and not good.

What options do we have? I'm aware of:

  1. Archive the git history and copy over the HEAD to a fresh repository (and be more careful with large files).
  2. Prune large files from the history.
  3. Implement something like git-lfs going forward.

Any recommendations?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source