Q:

List commits that changed a specific file?

Is there a way to list all commits that changed a specific file regardless of HEAD?
I want to include commits on branches that are not reachable from HEAD.

A:

You can pass the --all flag to git log to look at all branches.
git log --all --follow --pretty="%H" -- PATH/TO/FILE
EDIT: Add the --follow option to detect renames

