Difference between revisions of "Git restore permissions"
Jump to navigation
Jump to search
(Created page with "https://stackoverflow.com/questions/2517339/how-to-restore-the-permissions-of-files-and-directories-within-git-if-they-have ``` git diff -p -R --no-ext-diff --no-color \...") |
(No difference)
|
Latest revision as of 16:02, 18 May 2023
git diff -p -R --no-ext-diff --no-color \ | grep -E "^(diff|(old|new) mode)" --color=never \ | git apply
git config --global --add alias.permission-reset '!git diff -p -R --no-ext-diff --no-color | grep -E "^(diff|(old|new) mode)" --color=never | git apply'
git permission-reset