Skip to content

Instantly share code, notes, and snippets.

@jpogran
Created March 25, 2011 15:53
Show Gist options
  • Save jpogran/887070 to your computer and use it in GitHub Desktop.
Save jpogran/887070 to your computer and use it in GitHub Desktop.
import svn sub project repo into git and maintain history
//dump repo from svn
svnadmin dump foo > foo_full.dmp
//filter by project
svndumpfilter include --drop-empty-revs --renumber-revs --skip-missing-merge-sources FooBarCom < foo_full.dmp > foo_root_dir.dmp
//edit dmp files using text editor
//(suggest vim to not munge text and automatically convert end-of-line characters to the native format)
//...
//load dmp back into seperate repo
svnadmin create foobarcom
svnadmin load foobarcom < foobarcom_no_root_dir.dmp
// via git svn
//if you have troubles, you might need to delete your auth files in your svn folder
git svn clone --authors-file ./authors --no-metadata --stdlayout http://server/svn/foobarcom/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment