0
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 3 years have passed since last update.

Gitの容量を削減して地球(コンピュータ)に優しい世界を作ろう!

Last updated at Posted at 2020-05-19

この作業は慎重に行ってください。一切の責任を負いかねます。

.git/objectsのサイズを測ろう

du -sh .git/objects.git/objectsのサイズが測れます。
削減前に測ってみましょう。

Garbage Collection --optional

git gc --auto

使われないデータを選定

git reflog expire --expire=now --allで使わないものを選定

# Clean!
git gc --aggressive --prune=nowで綺麗にしましょう
再度du -sh .git/objectsでサイズを測ってみよう!

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