To diff common binary files in git using appropriate external converters such as unrtf, pandoc, docx2txt.pl, odt2txt, git-xlsx-textconv, git-xlsx-textconv.pl or pptx2md, add to ~/.config/git/config
the lines
[diff]
[diff "pdf"]
binary = true
# textconv = pdfinfo
textconv = sh -c 'pdftotext -layout "$0" -enc UTF-8 -nopgbrk -q -'
cachetextconv = true