duality
duality copied to clipboard
Deal with Large Files in Git History
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.
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.
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.
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...