How to find the number of files changed from one commit to another in git

EDIT: “this will always count the files plus one, cause the --format=oneline includes the commit-hash/header” as mentioned by c00kiemon5ter


The git whatchanged tool shows you a summary of files that were modified. By itself it lists all commits, but you can also limit it to just the recent n commits:

git whatchanged -1

To count files:

git whatchanged -1 --format=oneline | wc -l

See git help whatchanged for details.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)