1
0

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 1 year has passed since last update.

肥大化した.git ファイルのtmpファイルを探して削除

Last updated at Posted at 2019-11-29

なにがしたい

200GくらいあるでかいGitリポジトリを使用していた.
気がつけば100Gくらい容量が膨れ上がった.
調べてみると.git以下のファイルが肥大化していた.

対処

git gcで失敗した際のtempファイルが悪さをしていたみたい.
以下コマンドで思いファイルを探す.

# 不要ファイルがないか確認したい
find .git/ -iname "*tmp_pack*" -print0| xargs -0 du -sh

# 不要ファイルを直接削除
find .git/ -iname "*tmp_pack*" -print0| xargs -0 rm

このファイル一覧の中に
tmp_pack_AbCdEfg
のようなものがいれば消しても良いはず. git gc時に中断してしまった際のtmpファイルのようだ.

自分の場合はlfs管理しているところで80Gほどのtmpファイルが作成されていた.

参考

1
0
0

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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?