Archived post: posted sometime between 2016 and 2022.

Combine git, sort, and tail to view the most changed files.

The following lets us see the top 20 most changed files in a git diff.

 git --no-pager diff master | sort -k3 -n | tail -20

Use man sort for details on the options.