#!/bin/bash

rm -rf diffbinary
mkdir diffbinary
cd diffbinary

git init
echo "the content" > file.txt
echo "file.txt -diff Unset" > .gitattributes
git add file.txt .gitattributes
git commit -m "Add files."
echo "new content"> file.txt

# This command:
git diff
# will now output "Binary files a/file.txt and b/file.txt differ", even though the file isn't a binary.
