LoginSignup
13
16

More than 5 years have passed since last update.

Git のガベージコレクションについて

Last updated at Posted at 2015-06-13

Git のガベージコレクションについてのメモ。

設定

git help config (v1.9.2) より。

見出しの () はデフォルト値。

gc.auto (6700)

When there are approximately more than this many loose objects in the repository, git gc --auto will pack them.

ルーズオブジェクト (パックされてないオブジェクト) が、ここで指定された個数を越えると、git gc --auto がそれらを pack する。

Some Porcelain commands use this command to perform a light-weight garbage collection from time to time.

Porcelain (一般ユーザ向け) コマンドのいくつかは、軽量なガベージコレクションのために git gc --auto を裏で実行する。

The default value is 6700. Setting this to 0 disables it.

デフォルト 67000 で無効。

gc.autopacklimit (50)

When there are more than this many packs that are not marked with *.keep file in the repository, git gc --auto consolidates them into one larger
pack.

pack ファイルが指定された個数を越えると、git gc --auto 時に 1つの pack にまとめ直される。*.keep ファイルで保持し続けられる。

The default value is 50. Setting this to 0 disables it.

デフォルトは 500 で無効。

gc.pruneExpire (2 weeks ago)

When git gc is run, it will call prune --expire 2.weeks.ago.

git gc 実行時に、prune --expire 2.weeks.ago が呼ばれる。2週間以上前の、到達不能なオブジェクトが削除される。

Override the grace period with this config variable.

The value "now" may be used to disable this grace period and always prune unreachable objects immediately.

到達不能なオブジェクトをすぐ消すには now を設定する。

gc.reflogexpire (90 days)

git reflog expire removes reflog entries older than this time;

git reflog expire が、この値で指定されたより古い reflog を削除する。

defaults to 90 days.

デフォルトは 90 days

With "<pattern>" (e.g. "refs/stash") in the middle the setting
applies only to the refs that match the <pattern>.

gc.<pattern>.reflogexpire のような設定で、reflog 毎の期限を設定できる。

gc.reflogExpireUnreachable (30 days)

git reflog expire removes reflog entries older than this time and are not reachable from the current tip;

git reflog expire 時に、現在の (リファレンスが指す?) 先端 (tip) から到達できない reflog で、この値で指定されたより古いものを削除する。

defaults to 30 days.

デフォルトは 30 days

With "<pattern>" (e.g. "refs/stash") in the middle, the setting applies only to the refs that match the .

gc.reflogexpire と同様に、パターン指定できる。

gc.rerereresolved (60 days)

Records of conflicted merge you resolved earlier are kept for this many days when git rerere gc is run.

git rerere gc 実行時に、この値で指定したより前に解消したコンフリクトのマージの記録が削除される。

The default is 60 days. See git-rerere(1).

デフォルトは 60 days

gc.rerereunresolved (15 days)

Records of conflicted merge you have not resolved are kept for this many days when git rerere gc is run.

git rerere gc 実行時に、この値で指定したより前の、解消しなかったコンフリクトのマージの記録が削除される。

The default is 15 days. See git-rerere(1).

デフォルトは 15 days

gc.aggressiveWindow (250)

The window size parameter used in the delta compression algorithm used by git gc --aggressive.

git gc --aggressive 時に使う差分圧縮アルゴリズムのウィンドウサイズ。

This defaults to 250.

デフォルトは 250

13
16
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
13
16