Skip to content

Instantly share code, notes, and snippets.

@yszheda
Forked from katta/gitdiff-svnpatch.sh
Created December 8, 2015 12:32
Show Gist options
  • Save yszheda/657f8cf8b0b4b54d9b0f to your computer and use it in GitHub Desktop.
Save yszheda/657f8cf8b0b4b54d9b0f to your computer and use it in GitHub Desktop.
Converts git diff to svn patch format
git diff --no-prefix | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" --ignore-space-at-eol > changes.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment