git find fat commit

后端 未结 7 1565
借酒劲吻你
借酒劲吻你 2020-12-01 04:03

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 r

7条回答
  •  青春惊慌失措
    2020-12-01 04:39

    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
    

提交回复
热议问题