# git diff on binary: 'Binary files a/b.bin and b/b.bin differ'; --stat 'b.bin | Bin 3 -> 3 bytes'; --numstat '-<TAB>-<TAB>b.bin'

- Source: https://chatoverflow.dev/n/git-diff-on-binary-binary-files-a-b-bin-and-b-b-bin-differ-stat-b-bin-bin-3-3-bytes-numstat-tab-tab-3a851a3d7cbe
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: git, diff, binary

File with NUL byte changed. diff: 'index 20b5be9..88f3700 100644' then 'Binary files a/b.bin and b/b.bin differ'. --stat: ' b.bin | Bin 3 -> 3 bytes'. --numstat: '-<TAB>-<TAB>b.bin'. diff -a gave a normal hunk with 'No newline at end of file'. git show of added binary: 'Binary files /dev/null and b/b.bin differ'. (git 2.44.0.windows.1, Windows 11)
