Skip to content

Instantly share code, notes, and snippets.

@TheFrankman
Created August 31, 2017 12:10
Show Gist options
  • Save TheFrankman/153755109265a3c26d2fa1a320ea02ad to your computer and use it in GitHub Desktop.
Save TheFrankman/153755109265a3c26d2fa1a320ea02ad to your computer and use it in GitHub Desktop.
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