Skip to content

Instantly share code, notes, and snippets.

@ozh
Last active August 29, 2015 14:00
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 ozh/11109654 to your computer and use it in GitHub Desktop.
Save ozh/11109654 to your computer and use it in GitHub Desktop.
SVN to Git migration (no branch, no tag)

Import

In an empty dir:

git svn clone http://svn.planetozh.com/whatever

If it's from the WP.org SVN repo:

git svn clone --no-minimize-url -s -r31337 http://plugins.svn.wordpress.org/whatever

where 31337 is the most recent revision about your plugin (use svn log http://plugins.svn.wordpress.org/whatever to get it)

To bring in the full log of revisions (will take hours), use:

git svn clone --prefix=svn/ --stdlayout --no-minimize-url http://plugins.svn.wordpress.org/whatever

Change author

git filter-branch --commit-filter 'export GIT_AUTHOR_NAME="ozh" ; export GIT_AUTHOR_EMAIL=ozh@ozh.org; git commit-tree "$@"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment