duality icon indicating copy to clipboard operation
duality copied to clipboard

Deal with Large Files in Git History

Open ilexp opened this issue 8 years ago • 3 comments

Due to some early mistakes in the project, the full repository is somewhat around 300 MB big. If there is a safe way to do this, this should be fixed.

  • The complete history of the repository should be preserved.
  • All commit IDs should remain the same.
  • Forks on GitHub need to be unaffected.
  • All that should be done is replacing the data of the affected files with zero-length dummy files. They should still remain in place. If possible, replacing them with "REMOVED" plain-text is preferable.
  • This needs to be done in a safe way.

No experiments. Any insights on how to do this with git and GitHub appreciated.

ilexp avatar Oct 31 '15 19:10 ilexp

Direct Link to one of the earliest commits: Click here. Navigate into the folder "Other". Subfolders "Dependencies", "Resources" and "TechDemos" are prime candidates for removal.

The linked commit is - as a flat copy - already 80 MB big, most of which being located in those three folders.

ilexp avatar Oct 31 '15 19:10 ilexp

You could try using Git LFS to store big files. I think what it does is exactly what you need: a reference object is uploaded to the repository instead of the actual file.

Xinayder avatar Nov 03 '15 16:11 Xinayder

Some instructions here: https://blog.ostermiller.org/git-remove-from-history

The fact that all users of this repo will have to do something makes this non trivial. You are basically rewriting the history but that history is shared with everyone...

Barsonax avatar Mar 29 '18 14:03 Barsonax