Skip to content

Instantly share code, notes, and snippets.

@killfill
Created June 7, 2012 19:18
Show Gist options
  • Save killfill/2890976 to your computer and use it in GitHub Desktop.
Save killfill/2890976 to your computer and use it in GitHub Desktop.
SVN -> GIT Migration
ORIG=http://repo
TRUNK=branches/my_trunk
1) In the svn project:
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
2) Edit author names
3) git svn clone $ORIG -A ../authors-transform.txt --no-metadata --trunk $TRUNK
Note: git saves branched data in 'git for-each-ref' or 'git branch -r' ...
4) git svn show-ignore > .gitignore
6) Checkout from the created repo, to get a clean one
7) Push to the --bare git repo!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment