Reputation: 81
I am converting an SVN repository to a brand new GIT repository.
The old SVN repo has multiple branches:
I did manage to do a conversion, using the svn2git
tool.
git svn clone https://url/to/svn/server --no-metadata --authors-file=authors-transform.txt
Although, the file history conversion was not successful. On the new GIT repository, I can only see the file history for the determinate folder, not trough all old "svn branches".
How can I migrate those svn folders (branches) to a GIT structure, so that file history can be successful maintained?
Perhaps, make every svn folder a new GIT branch, and keep the latest svn branch as the master branch on the new GIT repo.
Upvotes: 0
Views: 205
Reputation: 11
The right tool for that is called SubGit. It has flexible branches mapping, see docs: https://subgit.com/documentation/branches-mapping.html
Upvotes: -1
Reputation: 97355
Re-read git svn docs, add all required parameters in order to define location(s) of your repo's branches/tags/
Even if https://url/to/svn/server
is your repo-root and you use default layout, you must to define it for clone using additional --stdlayout
option. If your tree have more complex structure, you have to describe it using separate options.
Upvotes: 3