Created
June 16, 2011 08:10
-
-
Save katta/1028871 to your computer and use it in GitHub Desktop.
Converts git diff to svn patch format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
In case we already have a diff which got generated without "--no-prefix" option, here is a script git-diff-to-svn-path.sh that is inspired from this script
gitdiff-svnpatch.sh