Skip to content

Instantly share code, notes, and snippets.

@Thermionix
Created June 1, 2014 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thermionix/0b6382b5a121942000e4 to your computer and use it in GitHub Desktop.
Save Thermionix/0b6382b5a121942000e4 to your computer and use it in GitHub Desktop.
apply an svn revision onto a git repo (including binary files)
$rev=40469 ; $url="svn://svn/test/branches/1.0.3" ; $clonedir="C:\source\test" ; $gitbin="${env:ProgramFiles(x86)}\Git\bin" ; cmd /c "svn diff --force --patch-compatible --diff-cmd `"$gitbin\diff.exe`" -x `"--text --unified`" -c $rev $url | git apply --directory=`"$clonedir`" -p0 --reject --verbose -"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment