bcoughlan bcoughlan - 2 months ago 9
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.

Answer

Does this help you ?

git log -p **/MyFile.java