-1

I have a SVN repo that I need to move to GIT. For historical reasons that predate my role and that I cannot resolve, the layout is as follows (let's call the project "project" for lack of a better term):

project/trunk
project/tags
project/branches

Standard layout. The problem is that the trunk was never updated, not in a long time. Neither tags, so that's useless.

The real meat and potatoes is under project/branches, as follows:

project/branches/branch1 (starts at revision r1)
project/branches/branch2 (starts at revision r2)
... 
project/branches/branch_W (starts at revision r_w)
...
project/branches/branch_X (starts at revision r_w)
...
project/branches/branch_Y (starts at revision r_y)
...
project/branches/branch_Z (starts at revision r_z)

The way branches were created was by branching (branch_child) directly from another branch (branch_parent), rather than branching from trunk (after trunk being updated/rebased with branch_parent).

Also, branch_parent might have been deleted, and there are a lot of dead-end branches.

In this example, I want to get branch_W ... branch_Z, with branch_W at revision_w as the start of the revision range. In my case, I need to do this with about a dozen branches created in such a fashion.)

Anyone that could suggest an efficient (or at best, least pain-inducing) way to get git svn clone to accomplish this?

Worst come to worst, I'd just git svn clone the most recent branch (I can do that.) But I find it extremely important to bring all the history from the branches I'm interested in.

Thanks.

luis.espinal
  • 10,331
  • 6
  • 39
  • 55
  • 1
    My advice is to go via an "inefficient" way: `git svn clone` using the standard layout and rename/remove/rebase branches using `git`. – phd May 12 '20 at 15:44
  • I see. I was hoping for a shortcut since this thing is massive :/ – luis.espinal May 12 '20 at 16:41

1 Answers1

0

I gave up, the original structure is way too convoluted/mismanaged and the log history too long to even try to do this.

The solution suggested by @phd (to git svn clone using the standard layout) could have worked under normal circumstances.

So I am left with git svn'ing the most recent branch and take it as the trunk/master.

luis.espinal
  • 10,331
  • 6
  • 39
  • 55