Skip to content

Instantly share code, notes, and snippets.

@truongvinht
Created November 18, 2021 20:09
Show Gist options
  • Save truongvinht/271d3fb7f4f3a57988a89458ab4dc437 to your computer and use it in GitHub Desktop.
Save truongvinht/271d3fb7f4f3a57988a89458ab4dc437 to your computer and use it in GitHub Desktop.
Git SVN Migration commands

Helpful scripts for git migration from SVN to Git

Init git remote url

git remote set-url origin GIT_URL

Strategy for migration with classic structure (trunk/branches/tags)

full svn clone

git svn clone -s SVN_URL

revision based svn clone

git svn clone -s -rXXXX:HEAD SVN_URL

Strategy for migration without structure

init empty

???

Manual edit git configuration: adjust svn-remote fetch

".:refs/remotes/trunk"

fetch content

git svn fetch -rXXXX:HEAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment