Show git diff, ignoring file permission changes?

This will tell git to ignore permissions:

git config core.filemode false

to filter them in result of diff but not ignore them

git filter-branch -f --tree-filter 'find * -type f | xargs chmod 644 ' -- --all

git diff -G"."

The -G flag filters out any file where a line that matches a regular expression has not been added or removed. In this case the regular expression provided is "." which matches any line. So the argument -G"." will filter out files where no lines have been added or removed.

You will need (I think) at least Git version 1.7.10 for this to work. 1.7.2 is too old, at least.

Tags:

Git

Diff

Git Diff