{"id":1534,"date":"2016-10-27T15:53:34","date_gmt":"2016-10-27T06:53:34","guid":{"rendered":"https:\/\/blog.ymyzk.com\/?p=1534"},"modified":"2016-10-27T15:53:34","modified_gmt":"2016-10-27T06:53:34","slug":"homebrew-gc","status":"publish","type":"post","link":"https:\/\/blog.ymyzk.com\/2016\/10\/homebrew-gc\/","title":{"rendered":"Homebrew \u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092 GC \u3057\u3066\u30b5\u30a4\u30ba\u3092\u524a\u6e1b\u3059\u308b"},"content":{"rendered":"
Homebrew \u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3067 GC \u3092\u5b9f\u884c\u3057\u3066, \u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u524a\u6e1b\u3067\u304d\u308b\u30b5\u30d6\u30b3\u30de\u30f3\u30c9 <\/p>\n Homebrew \u81ea\u4f53\u3084 Formula, Tap \u306f\u3059\u3079\u3066 Git \u3067\u7ba1\u7406\u3055\u308c\u3066\u3044\u307e\u3059. \u00a0\u3053\u308c\u3089\u306f\u591a\u304f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u542b\u307f\u983b\u7e41\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u308b\u305f\u3081, \u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30b5\u30a4\u30ba\u304c\u80a5\u5927\u5316\u3059\u308b\u50be\u5411\u306b\u3042\u308a\u307e\u3059.<\/p>\n Git \u30ea\u30dd\u30b8\u30c8\u30ea\u306f GC \u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067, \u4e00\u3064\u306e\u30d1\u30c3\u30af\u30d5\u30a1\u30a4\u30eb\u306b\u5727\u7e2e\u3057\u3066\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u524a\u6e1b\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059. GC \u306f\u30ea\u30dd\u30b8\u30c8\u30ea\u5185\u3067 Homebrew \u306f\u8907\u6570\u306e Git \u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u305f\u3081, \u305d\u308c\u305e\u308c\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3067 Homebrew \u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3067 GC \u3092\u5b9f\u884c\u3057\u3066, \u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u524a\u6e1b\u3067\u304d\u308b\u30b5\u30d6\u30b3\u30de\u30f3\u30c9 brew git-gc \u3092\u4f5c\u6210\u3057\u307e\u3057\u305f.<\/p>\n","protected":false},"author":2,"featured_media":1554,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,3],"tags":[54,21],"_links":{"self":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/1534"}],"collection":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/comments?post=1534"}],"version-history":[{"count":9,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/1534\/revisions"}],"predecessor-version":[{"id":1559,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/1534\/revisions\/1559"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/media\/1554"}],"wp:attachment":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/media?parent=1534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/categories?post=1534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/tags?post=1534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}brew git-gc<\/code><\/a> \u3092\u4f5c\u6210\u3057\u307e\u3057\u305f.<\/p>\n
Homebrew \u3068 Git<\/h2>\n
git gc<\/code> \u3068\u3059\u308c\u3070\u5b9f\u884c\u3067\u304d\u308b\u307b\u304b, \u4e00\u5b9a\u306e\u6761\u4ef6\u306b\u9054\u3059\u308b\u3068\u81ea\u52d5\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059. \u8a73\u7d30\u306f\u3053\u3061\u3089<\/a>\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3059.<\/p>\n
git gc<\/code> \u3092\u5b9f\u884c\u3059\u308b\u306e\u306f\u9762\u5012\u3067\u3059.
brew git-gc<\/code> \u306f Homebrew \u304c\u7ba1\u7406\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u7c21\u5358\u306b GC \u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059.<\/p>\n
\u4f7f\u3044\u65b9<\/h2>\n
brew git-gc<\/code> \u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b, tap \u3092\u8ffd\u52a0\u3057\u307e\u3059.<\/p>\n
brew tap ymyzk\/ymyzk<\/code><\/pre>\n
brew git-gc<\/code> \u3092\u5b9f\u884c\u3059\u308b\u3068, Homebrew \u304c\u7ba1\u7406\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u9806\u306b
git gc<\/code> \u3092\u5b9f\u884c\u3057, \u5727\u7e2e\u524d\u5f8c\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u8868\u793a\u3057\u307e\u3059. \u6b21\u306e\u4f8b\u3067\u306f\u7d0420MB\u5727\u7e2e\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u3066\u3044\u307e\u3059: (\u6ce8: \u30c6\u30b9\u30c8\u306e\u305f\u3081\u306b\u4f55\u5ea6\u304b\u5b9f\u884c\u3057\u3066\u3044\u308b\u305f\u3081\u524a\u6e1b\u91cf\u304c\u5c11\u306a\u304f\u306a\u3063\u3066\u3044\u307e\u3059.)<\/p>\n
$ brew git-gc\r\n\/usr\/local\/Homebrew\r\n$ git gc\r\nCounting objects: 70464, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (18073\/18073), done.\r\nWriting objects: 100% (70464\/70464), done.\r\nTotal 70464 (delta 50816), reused 70000 (delta 50482)\r\n17580KB -> 15660KB\r\n\r\n\/usr\/local\/Homebrew\/Library\/Taps\/homebrew\/homebrew-core\r\n$ git gc\r\nCounting objects: 20948, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (7984\/7984), done.\r\nWriting objects: 100% (20948\/20948), done.\r\nTotal 20948 (delta 13183), reused 20506 (delta 12855)\r\n17220KB -> 6736KB\r\n\r\n\u301c\u301c\u301c\u301c\u301c \u4e2d\u7565 \u301c\u301c\u301c\u301c\u301c\r\n\r\n\/usr\/local\/Homebrew\/Library\/Taps\/ymyzk\/homebrew-ymyzk\r\n$ git gc\r\nCounting objects: 29, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (16\/16), done.\r\nWriting objects: 100% (29\/29), done.\r\nTotal 29 (delta 12), reused 29 (delta 12)\r\n116KB -> 116KB\r\n\r\nTotal: 45924KB -> 29212KB<\/code><\/pre>\n
brew git-gc<\/code> \u306f
git gc<\/code> \u304c\u53d7\u3051\u4ed8\u3051\u308b\u4efb\u610f\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4e0e\u3048\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059. \u4f8b\u3048\u3070
--aggressive<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5229\u7528\u3057\u3066\u3055\u3089\u306b\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u5c0f\u3055\u304f\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059:<\/p>\n
$ brew git-gc --aggressive\r\n\/usr\/local\/Homebrew\r\n$ git gc --aggressive\r\nCounting objects: 70498, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (68589\/68589), done.\r\nWriting objects: 100% (70498\/70498), done.\r\nTotal 70498 (delta 50846), reused 19616 (delta 0)\r\n15804KB -> 15652KB\r\n\r\n\u301c\u301c\u301c\u301c\u301c \u4e2d\u7565 \u301c\u301c\u301c\u301c\u301c\r\n\r\nTotal: 29640KB -> 28984KB<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"