Reputation: 5414
I am working with an SVN which started out with all files tracked in the root of the folder. At some point, they began using the standard branches/tags/trunk structure, moving the working files to trunk so they could create branches and tags from it.
I would like to convert this SVN into a git, maintaining the change history with some continuity across that move. When I use git svn clone
with the -s
option to convert the SVN tags and branches into git tags and branches, it does not grab the history of files in the root directory from the beginning of the SVN. Instead it treats the move into trunk as a mass add to master.
Is there any way to create a git that maintains both the old pre-trunk history, and also the newer branch and tag history?
Upvotes: 0
Views: 85
Reputation: 24040
It's probably easier to import everything into Git first and then use filter-branch to do the history rewriting in Git after the fact. You may be able to do it with a git svn import/fetch up to the point where the structure changes, then edit the svn configuration and do an svn forwards from there.
However I'd do the git-only option, because git is far more powerful than svn and it would be easier to do the rewrites with git filter-branch after the fact.
Upvotes: 1