0

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.

Adamarla
  • 739
  • 9
  • 20
  • 1
    Possible duplicate of [How to list all commits that changed a specific file?](https://stackoverflow.com/questions/3701404/how-to-list-all-commits-that-changed-a-specific-file) – phd Oct 17 '19 at 14:33
  • https://stackoverflow.com/search?q=%5Bgit%5D+list+all+commits+changed+file – phd Oct 17 '19 at 14:33

1 Answers1

4

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

EncryptedWatermelon
  • 4,788
  • 1
  • 12
  • 28