Wednesday, September 16, 2015

Forcing git diff to compare non-text files

While trying to figure out how to make Git treat my uncompressed Pdf documents as text (and not binary), I found the following resources:

http://stackoverflow.com/questions/13486027/how-can-i-treat-a-file-not-a-binary-git
http://stackoverflow.com/questions/14771414/git-force-file-encoding-on-commit

It appears there is a way to customize diff.  I haven’t tried it myself yet, but plan to in the future.

https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes

Here’s a tool that can be used to `git diff` MS Word files.

http://docx2txt.sourceforge.net/