git diff without change mode 1

git diff without change mode

git diff --summary | grep --color 'mode change 100755 => 100644' | cut -d' ' -f7- | xargs -d'\n' chmod +x
git diff --summary | grep --color 'mode change 100644 => 100755' | cut -d' ' -f7- | xargs -d'\n' chmod -x

Here is what the above code is Doing:
1. git diff –summary | grep –color ‘mode change 100755 => 100644′
– This will show all files that have changed from executable to non-executable.
2. cut -d’ ‘ -f7-
– This will cut the output of the previous command and only show the file names.
3. xargs -d’\n’ chmod +x
– This will take the output of the previous command and run chmod +x on each file.

Similar Posts