Finding most changed files in Git

前端 未结 9 1670
野的像风
野的像风 2020-11-29 15:24

How can I show files in Git which change most often?

9条回答
  •  我在风中等你
    2020-11-29 15:59

    I noticed that both Mark’s and sehe’s answers do not --follow the files, that is to say they stop once they reach a file rename. This script will be much slower, but will work for that purpose.

    git ls-files |
    while read aa
    do
      printf . >&2
      set $(git log --follow --oneline "$aa" | wc)
      printf '%s\t%s\n' $1 "$aa"
    done > bb
    echo
    sort -nr bb
    rm bb
    

    git-most.sh

提交回复
热议问题