git找到胖提交 [英] git find fat commit
本文介绍了git找到胖提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
忘记回复,我的答案是:
git rev-list --all --pretty = format:'%H%n%an%n%s'#获取所有提交
git diff-tree -r -c -M -C --no-commit-id#{sha}#为每次提交获取新的blob
git cat-file --batch-check << blob ids#获取每个blob的大小
Is it possible to get info about how much space is wasted by changes in every commit — so I can find commits which added big files or a lot of files. This is all to try to reduce git repo size (rebasing and maybe filtering commits)
解决方案
Forgot to reply, my answer is:
git rev-list --all --pretty=format:'%H%n%an%n%s' # get all commits
git diff-tree -r -c -M -C --no-commit-id #{sha} # get new blobs for each commit
git cat-file --batch-check << blob ids # get size of each blob
这篇关于git找到胖提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文