0
1

More than 5 years have passed since last update.

Gitの大きいリポジトリを小さくする方法

Last updated at Posted at 2019-02-25

git gcだけだと二週間がデフォルトなのですぐに消えない。
nowをつけて即時削除する。

$ git reset HEAD
$ git reflog expire --expire=now --all
$ git gc --aggressive --prune=now

参考: https://blog.clock-up.jp/entry/2017/12/03/git-gc

これで.git/容量が 1.2GB -> 5.7MB になった。

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