Migrating from svn with svn externals, to git. Each svn externals may have it's own svn:externals. There is no guide how to migrate svn with externals to git here that I found useful. Each branch may have it's own branches tags trunk. What's the best way to migrate the whole repository? I am looking at git svn clone of the main repository adding git submodules, of each one external cloned as well. But Since the externals are nested, I don't know what's the best solution. Script used till now:
https://github.com/eneroth/git-externals
https://github.com/eneroth/git-externals
I have my own research and I didn't found an all-in-one solution from the opensource. There is plenty single "one sided" solutions which are does not cover many aspect of svn-to-git conversion like:
svn:externals
svn:ignore
conversion into .gitignore
author@<repo-guid>
after the git-svn
tool)...and so on.
It's a pretty big area to invetigate or research to yourself and can consume much time to at least find out what you actually need or want from the svn-to-git or whatever conversion.
For myself I've found this as a pretty much close to what i want: https://techbase.kde.org/Projects/MoveToGit/UsingSvn2Git
Example of the rules file: https://cgit.kde.org/kde-ruleset.git/tree/kde-rules-main
Example of the account map: https://cgit.kde.org/kde-ruleset.git/tree/account-map
Script examples to pack/push from the local bare git repository (generates by the KDE tool) to the remote git repository: https://phabricator.wikimedia.org/diffusion/OSOF/browse/master/svn2git/scripts
Third party projects to scan the SVN repo before slice it:
Some of ports to other third party projects:
svnrdump
, but additionally allow dumps of subdirectories even if your repository access is limited to this subdirectory)Some standalone interesting implementations:
But still, there is many not resolved aspect or cons like:
subtree
/submodules
/etc to slice SVN repo into one GIT root repo with references to other small GIT repossvn:externals
to git subtrees (the rules from the KDE project does support only a manual or semi automatic (regular expressions) conversion)If you decide to use the KDE convertor, then you can write a script to prepare the rules for each revision range what you want translate for svn:externals
into what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With