3 ms·
Git allows you to rewrite history, so you can "crush" old commits to reduce the size of history as needed.
by mrguyorama 4y ago
Git allows you to rewrite history, so you can "crush" old commits to reduce the size of history as needed.
- cabirum 4y agoSure, but rewriting it manually is a tedious process. Should be automated on github side, to keep repo size approx constant over time.
- Arnavion 4y agoThat would be silent data loss, so absolutely should not be automated.
- blueflow 4y agoGithub cant rewrite the refs on their own without breaking users stuff. They can only repack the existing objects, the squashing needs to be done by the developers. Also its a non-fast-forward thing, so it needs to be coordinated between the git users anyways.
- saghm 4y agoI think this is what `git filter-branch` its supposed to be for: https://git-scm.com/docs/git-filter-branch https://git-scm.com/docs/git-filter-branch I've never used it before, but from what I understand, it's very powerful but also very confusing and easy to mess up, and of course with a sort of vague ambiguous name that makes it hard to discover; in other words, it's quintessentially git.
- deleted 4y ago[deleted]
- jacobr1 4y agoIt would be great to have some kind of way to do this while still maintaining the merkle-tree.
- jonhohle 4y agoIsn’t that what packs are for? The raw, content addressable object store has no inherent optimization for reducing repo size. Any changed file is completely copied until a higher level does something to compress that down.