Advertisement
asanchez75

git/reset/permissions

Dec 13th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. git diff -p \
  2. | grep -E '^(diff|old mode|new mode)' \
  3. | sed -e 's/^old/NEW/;s/^new/old/;s/^NEW/new/' \
  4. | git apply
  5.  
  6.  
  7. https://www.builtinbruges.com/2013/03/git-tricks-permission-reset/
  8.  
  9. git config --global --add alias.permission-reset '!git diff -p | grep -E "^(diff|old mode|new mode)" | sed -e "s/^old/NEW/;s/^new/old/;s/^NEW/new/" | git apply'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement