Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@GromNaN
Created January 4, 2012 16:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GromNaN/1560785 to your computer and use it in GitHub Desktop.
Save GromNaN/1560785 to your computer and use it in GitHub Desktop.
Track GIT changes into SVN
# Track changes from a GIT repository as snapshots into SVN
SVN_REPOS=<svn_repos>
GIT_REPOS=<git_repos>
GIT_BRANCH=<branch>
git svn clone $SVN_REPOS repos
cd repos
git remote add origin $GIT_REPOS
git fetch origin
git merge --squash --strategy subtree origin/$GIT_BRANCH
git commit -m "Import from GIT"
git svn dcommit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment