bcoughlan bcoughlan - 1 month ago 4x
Git Question

Show all commits with diff for a file

I'm looking for a cleaner way to accomplish the following:

for a in $(git log --abbrev=commit --pretty=format:'%H' -- '**/MyFile.java'); do git show $a -- '**/MyFile.java'; done

I want to
git show
all changes to a file for all commits that have made changes to this file.


Does this help you ?

git log -p **/MyFile.java