{"id":17577,"date":"2024-05-10T05:59:13","date_gmt":"2024-05-10T05:59:13","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=17577"},"modified":"2024-05-10T06:03:59","modified_gmt":"2024-05-10T06:03:59","slug":"git-garbage-collection","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=17577","title":{"rendered":"Garbage Collection (Git)"},"content":{"rendered":"<p><strong>Facts<\/strong><\/p>\n<ul>\n<li>It can be locally configured.<\/li>\n<li>It can be triggered manually as well.<\/li>\n<li>It cleans up not only orphaned commits.<\/li>\n<\/ul>\n<hr>\n<p><strong>Orphaned commits<\/strong><\/p>\n<p>When you are rebasing or resetting you will make some commits become orphaned.<br \/>\n(You can still see them via the git reflog.)<\/p>\n<hr>\n<p><strong>Configuration<\/strong><\/p>\n<p>You can configure the GC on you local machine. It will triggered with commands like pull, merge, rebase or commit.<\/p>\n<pre>\r\ngit config gc.pruneExpire\r\nTime until inaccessible objects will deleted.\r\n(Default is 14 days)\r\n\r\ngit config gc.reflogExpireUnreachable\r\nTime until inaccessible objects will be removed from the reflog.\r\n(Default is 90 days)\r\n\r\ngit config gc.reflogExpire\r\nTime until accessible objects will be removed from the reflog.\r\n(Default is 30 days)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Facts It can be locally configured. It can be triggered manually as well. It cleans up not only orphaned commits.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[24],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17577"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17577"}],"version-history":[{"count":24,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17577\/revisions"}],"predecessor-version":[{"id":17601,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17577\/revisions\/17601"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17577"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}