logoalt Hacker News

uasitoday at 5:52 AM1 replyview on HN

Git can display diff between binary files using custom diff drivers:

> Put the following line in your .gitattributes file: *.docx diff=word

> This tells Git that any file that matches this pattern (.docx) should use the “word” filter when you try to view a diff that contains changes. What is the “word” filter? You have to set it up [in .gitconfig].

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


Replies

theknarftoday at 7:48 AM

Would be interesting to see some tooling built around being a custom diff driver for a bunch of different standard formats!

show 1 reply