Git, find out which files have had the most commits

前端 未结 4 357
耶瑟儿~
耶瑟儿~ 2021-01-30 14:29

How can I search my git logs to see which files have had the most activity?

4条回答
  •  盖世英雄少女心
    2021-01-30 15:02

    Assuming the range of revisions you want to select is , the command:

    git log --format=%n --name-only |sort|uniq -c|tail -n +2
    

    will output for each file of your repository the number of occurences in commit diffs, ie number of changes, including file creation as a change. Keep empty to get statistics from initial commit to your branch HEAD.

提交回复
热议问题