git: file history with diff

Show diff ONLY for src/main/resources/file.xml
git log -p src/main/resources/file.xml

Show diff for ALL FILES that touches src/main/resources/file.xml
git log -p --full-diff src/main/resources/file.xml

Show diff but with 0 context lines (no context lines)

git log -p -U0

Similar like above, but diff in history

git diff -U0

Leave a Reply