What does it mean when Git diff shows mode changes?
It means that the file mode changed from 755 to 644, but the contents were not altered.
git diff
is exactly what you are looking for - it shows the changes from unstaged files to the last commit. git diff --cached
is for staged files.
Most probably, the contents of this file haven't changed, only the executable bit has been cleared. Try actually changing the file by, say, appending an empty line to it, and see what git diff
outputs.
Apart from file contents, Git also records the state of the executable bit for each file. It makes sense on Linux systems if you want scripts to be executable right after checkout. See also the following two related questions:
How do I make Git ignore file mode (chmod) changes?
How do I remove files saying "old mode 100755 new mode 100644" from unstaged changes in Git?