There is a file, git st gets:
# On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: lib/ABC/Main.pm # no changes added to commit (use "git add" and/or "git commit -a") git diff gets:
diff --git a/lib/ABC/Main.pm b/lib/ABC/Main.pm old mode 100755 new mode 100644 git diff HEAD gets the same.
After adding file, git diff shows nothing.
git diff HEAD gets:
diff --git a/lib/ABC/Main.pm b/lib/ABC/Main.pm old mode 100755 new mode 100644 How to show just differences from git diff rightly?