Reputation: 3272
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?
Upvotes: 1
Views: 539
Reputation: 454
This is because the only changes to Main.pm
are the file permissions. There are no differences in file content.
Upvotes: 2