- Word:
docx2txt
(brew install docx2txt
) - Excel:
xlsx2txt
- PDF:
pdf2txt
(brew install poppler
) - Images:
exiftool
(brew install exiftool
)
~/.gitconfig
[core]
attributesfile = ~/.config/git/attributes
[diff "word"]
textconv = docx2txt
[diff "excel"]
binary = true
textconv = xlsx2txt
[diff "pdf"]
textconv = pdf2txt
[diff "exif"]
textconv = exiftool
~/.config/git/attributes
*.docx diff=word
*.xlsx diff=excel
*.pdf diff=pdf
*.png diff=exif
*.jpg diff=exif