bcoughlan bcoughlan - 10 months ago 45
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