Skip to content

Instantly share code, notes, and snippets.

@christopheradams
Created June 14, 2013 07:14
Show Gist options
  • Save christopheradams/5780050 to your computer and use it in GitHub Desktop.
Save christopheradams/5780050 to your computer and use it in GitHub Desktop.
Reset file permissions in a Git repository.
git diff -p | grep -E '^(diff|old mode|new mode)' | sed -e 's/^old/NEW/;s/^new/old/;s/^NEW/new/' | git apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment