I'm tracking a Virtual PC virtual machine file (*.vmc) in git, and after making a change git identified the file as binary and wouldn't diff it for me. I discovered that the file was encoded in UTF-16.
Can git be taught to recognize that this file is text and handle it appropriately?
I'm using git under Cygwin, with core.autocrlf set to false. I could use mSysGit or git under UNIX, if necessary.
Best Solution
I've been struggling with this problem for a while, and just discovered (for me) a perfect solution:
git difftool
takes the same arguments asgit diff
would, but runs a diff program of your choice instead of the built-in GNUdiff
. So pick a multibyte-aware diff (in my case,vim
in diff mode) and just usegit difftool
instead ofgit diff
.Find "difftool" too long to type? No problem:
Git rocks.