git diff numbers
diff --git a/numbers b/numbers
index 5f5fbe7..d184fef 100644
--- a/numbers
+++ b/numbers
@@ -1,3 +1,3 @@
-1
+4
+3
2
-3
Nu
If it is a single file, it can be done that way:
diff -u <(sort ./numbers) <(git show HEAD^^:./numbers | sort)
Running this command will tell you if a sorted file will introduce or not any other difference (i.e. ignoring lines order). If there are any suppressed or new lines, you will see them, but note that the diff output may not be accurate (files have been sorted, so these lines may be printed in a different order).