49
40

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git fetch する度に"Auto packing the repository in background for optimum performance." が出る

Last updated at Posted at 2015-03-27

1年ぐらい毎日コミットし続けているディレクトリの話

Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.

git gc しても出続けていた。

Why does git keep telling me it's "Auto packing the repository in the background for optimum performance" - Stack Overflow を参考に

git fsck

をしたらどのコミットからも参照されていないdanglingオブジェクトが大量にあった。
rebaseやaddした時に結局コミットしない、とかの状況で溜ってゆくようだ。
通常git gcで排除されそうなんだけど消えていないっぽい。

git gc --prune=now

したらこの警告は出なくなった

--pruneはデフォルト2 weeksなので2週間以内のオブジェクトも対象にするためにnowを指定している。

$ git count-objects -v
count: 0
size: 0
in-pack: 65065
packs: 1
size-pack: 304391
prune-packable: 0
garbage: 0
size-garbage: 0
49
40
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
49
40

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?