Skip to content

Instantly share code, notes, and snippets.

@oviniciusfeitosa
Last active August 31, 2020 20:33
Show Gist options
  • Save oviniciusfeitosa/54177db8a364f78ba4589ef7bad1dc85 to your computer and use it in GitHub Desktop.
Save oviniciusfeitosa/54177db8a364f78ba4589ef7bad1dc85 to your computer and use it in GitHub Desktop.
Git Permissions reset.md
git diff -p -R --no-ext-diff --no-color \
    | grep -E "^(diff|(old|new) mode)" --color=never  \
    | git apply

or

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

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment