Skip to content

Instantly share code, notes, and snippets.


Andrej Rypo dakujem

View GitHub Profile
jtdp / gist:5443498
Last active Sep 2, 2021
Revert file permission changes in local git repository.. Very useful when you change permissions due to working on a samba share. Lifted from:
View gist:5443498
git diff -p \
| grep -E '^(diff|old mode|new mode)' \
| sed -e 's/^old/NEW/;s/^new/old/;s/^NEW/new/' \
| git apply