I've got an svn tree which I'd like to turn into multiple independent git repositories. One aspect of this migration is that inodes which are cross-module symlinks in the subversion tree should be replaced by actual file content in the git repositories. So if, at some point, A/foo
is a symlink to B/foo
, then the corresponding git commit should have a normal file A/foo
whose content is the content of B/foo
. If some later svn commit changes the content of B/foo
, then the git module for A
should have a matching commit to reflect this change.
What tools can I use for this?
Right now, here is the best plan I could come up with so far:
- Clone the whole svn into git
fast-export
that- Massage the output using some custom-written throw-away code to turn symlinks into content files
fast-import
the result into a new single git repo- Create submodules from that
But perhaps you can suggest easier solutions, using existing code, existing functionality, existing tools, or making use of shortcuts I haven't thought of.
Perhaps there is even a way to handle more of these steps on the subversion side. Since I made heavy use of creating subversion copies of files, and since that concept can afaik be expressed only poorly in git concepts, I fear that the above approach might loose version history due to copied files.