git 瘦身,BFG Repo-Cleaner简介

通过bfg.jar工具,永久删除git里的大文件。

工具位置 https://rtyley.github.io/bfg-repo-cleaner/,使用也很简单。

$ git clone --mirror git://example.com/some-big-repo.git
$ java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git
$ cd some-big-repo.git
$ git reflog expire --expire=now --all && git gc --prune=now --aggressive
$ git push

猜你喜欢

转载自jw1314.iteye.com/blog/2421549