Notes &
Undoing mode changes in a git working tree
After restoring a bunch of stuff from a backup today I found this incredibly helpful:
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
Taken from: http://stackoverflow.com/questions/1580596/how-do-i-make-git-ignore-mode-changes-chmod