Doing an intro to git course on Pluralsight and git isn't cooperating with the diff section.
OS is Windows 8.1. I'm trying to diff two versions of a text file with no special characters. I created this text file in PowerShell via:
echo "Hello, world" > readme.txt
Regular diff command says that the binary files differ.
PS C:\GitTest> git diff HEAD~1..HEAD
diff --git a/readme.txt b/readme.txt
index 440580d..0d6852b 100644
Binary files a/readme.txt and b/readme.txt differ
When I force it with --text I get this output:
PS C:\GitTest> git diff --text HEAD~1..HEAD
diff --git a/readme.txt b/readme.txt
index 83f0e87..fef1216 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,2 +1,3 @@
-ÿþH-\ No newline at end of file
+ÿþH++\ No newline at end of file
Not sure why it thinks it is binary in the first place or why the above diff seems useless. The two versions of the file look like this:
HEAD~1:
Hello, Git!
Hello, again!
Hello, for the last time!
HEAD:
Hello, Git!
Hello, again!
Hello, for the last time!
Hello, again I hope this really is the last time...
My editor is using CRLF but I've got git set to core.autocrlf=true. I've ensured that the HEAD and HEAD~1 versions both have a newline at the end of the file.
I feel like I'm probably missing something simple - What is it? Any help is much appreciated.