{"provider_name":"Hatena Blog","author_name":"iww","published":"2025-04-22 08:00:00","type":"rich","author_url":"https://blog.hatena.ne.jp/iww/","image_url":"https://cdn.user.blog.st-hatena.com/default_entry_og_image/42132/1685946694840016","url":"https://iww.hateblo.jp/entry/20250422/git","title":"\u5168\u3066\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067 git gc \u3092\u3059\u308b","blog_url":"https://iww.hateblo.jp/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20250422%2Fgit\" title=\"\u5168\u3066\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067 git gc \u3092\u3059\u308b - \u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","version":"1.0","categories":["git","bash","Linux"],"height":"190","description":"\u30e9\u30f3\u30ad\u30f3\u30b0\u53c2\u52a0\u4e2d\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30e9\u30f3\u30ad\u30f3\u30b0\u53c2\u52a0\u4e2dLinuxgit gc \u3092\u3059\u308b\u3068\u30d5\u30a1\u30a4\u30eb\u6570\u304c\u6e1b\u308b\u3053\u3068\u3092\u6700\u8fd1\u77e5\u3063\u305f\u306e\u3067\u3001\u697d\u3057\u304f\u306a\u3063\u3066\u5168\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3084\u308a\u305f\u304f\u306a\u3063\u305f\u3002 #!/bin/bash DIR=$(pwd) stdbuf -oL find . -maxdepth 4 -name \".git\" | while read -r i; do cd \"$DIR\" cd \"${i%/.git}\" pwd git gc --aggressive done \u5b9f\u884c\u6642\u306e\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3092\u9069\u5f53\u306b\u63a2\u7d22\u3057\u3066 git gc \u3092\u3057\u3066\u307e\u308f\u308b","width":"100%","blog_title":"\u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12"}