Follow

Looking into how to store things efficiently in I came across this SO answer: stackoverflow.com/a/8198276

At the end of that answer was this:
`git gc --aggressive`
So I tried that on my local copy of Linus' git repo ... and its size went from 5.1G to 3.4G 😮
It takes a bit of time and CPU power, but I just saved 1.7G without throwing anything away 😎

· · Web · 1 · 3 · 2

@FreePietje Thank you for sharing.
This is what the Atlassian tutorial says about the `git gc --aggressive` command:
"The effects of --aggressive are persistent and only need to be run after a large volume of changes to a repository." Just an addendum.
atlassian.com/git/tutorials/gi

@gnufcl Thanks :) I forgot to reference the manpage, which says ~ the same thing too:
"The effects of this optimization are mostly persistent."

Sign in to participate in the conversation
unidentified instance

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!