[{"data":1,"prerenderedAt":73},["ShallowReactive",2],{"term-g\u002Fgit-garbage-collection":3,"related-g\u002Fgit-garbage-collection":59},{"id":4,"title":5,"acronym":6,"body":7,"category":40,"description":41,"difficulty":42,"extension":43,"letter":44,"meta":45,"navigation":46,"path":47,"related":48,"seo":53,"sitemap":54,"stem":57,"subcategory":6,"__hash__":58},"terms\u002Fterms\u002Fg\u002Fgit-garbage-collection.md","Git Garbage Collection",null,{"type":8,"value":9,"toc":33},"minimark",[10,15,19,23,26,30],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 - The Vibe Check",[16,17,18],"p",{},"Git garbage collection is spring cleaning for your repository. Over time you accumulate loose objects from commits that got amended, rebased away, or abandoned entirely, cluttering up .git with data nobody references anymore. Running git gc sweeps through, packs the objects you still need into efficient packfiles, and eventually lets the truly unreachable ones expire and get deleted, once the reflog stops holding onto them for safety.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"git gc performs housekeeping on a local repository: it packs loose objects into packfiles, prunes objects no longer reachable from any ref that have aged past the reflog expiration window, and optimizes internal data structures. It runs automatically in the background under normal usage via git gc --auto and can also be run manually, though running it aggressively right after a risky rebase or reset can prematurely remove objects you might still want to recover via the reflog.",[11,27,29],{"id":28},"when-youll-hear-this","When You'll Hear This",[16,31,32],{},"\"Run git gc if the .git folder is bloating the whole repo.\" \u002F \"Don't gc --aggressive right after a bad rebase, you might still need the reflog.\"",{"title":34,"searchDepth":35,"depth":35,"links":36},"",2,[37,38,39],{"id":13,"depth":35,"text":14},{"id":21,"depth":35,"text":22},{"id":28,"depth":35,"text":29},"git","Git garbage collection is spring cleaning for your repository.","intermediate","md","g",{},true,"\u002Fterms\u002Fg\u002Fgit-garbage-collection",[49,50,51,52],"Packfile","Reflog","Git Object Model","Git Bisect",{"title":5,"description":41},{"changefreq":55,"priority":56},"weekly",0.7,"terms\u002Fg\u002Fgit-garbage-collection","w2gCZncx9mfK-gnMfSnktBk_lnMJ3B15E_EgohSg6f8",[60,63,67,70],{"title":52,"path":61,"acronym":6,"category":40,"difficulty":42,"description":62},"\u002Fterms\u002Fg\u002Fgit-bisect","Git bisect is a binary search for bugs.",{"title":51,"path":64,"acronym":6,"category":40,"difficulty":65,"description":66},"\u002Fterms\u002Fg\u002Fgit-object-model","advanced","Under the hood, git doesn't actually store files and folders the way your operating system does.",{"title":49,"path":68,"acronym":6,"category":40,"difficulty":65,"description":69},"\u002Fterms\u002Fp\u002Fpackfile","A packfile is git's way of not storing your entire history as a million tiny loose files.",{"title":50,"path":71,"acronym":6,"category":40,"difficulty":42,"description":72},"\u002Fterms\u002Fr\u002Freflog","Git's reflog is the secret undo history that survives even after you think you've deleted something forever.",1792528087969]