How to get a list of Git commits for a given file

Clarice Bouwer - Jan 19 '22 - - Dev Community

This includes cases where the file has been renamed.

git log --follow filename.ext
Enter fullscreen mode Exit fullscreen mode

More on Stack Overflow: git log --follow, show all commits including merges

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .