Git-svn how to use a directory in a trunk as a local trunk

I inherit a code base in which there are many directories in the trunk that really need to live in separate repositories. All my development takes place in one specific directory, which should be the only one in the chest.

eg: / path / to / repo / trunk / true_trunk

all tags and branches in the repo refer exclusively to this directory "true_trunk".

Problem

is this: I cannot get git-svn to act like this trunk subdirectory is really a chest. and as a result, my chest checks fill my working directory with all the contents of the trunk, about a dozen or so other unrelated code bases.

is there any way to get git-svn to speak only with this "truth" trunk?

any attempt to specify this directory yields the following: Using a higher level URL: svn: // path / to / trunk / true_trunk => svn: // path / to / repo

+4
source share
2 answers

The -T git svn init option allows you to specify the directory that will be treated as the "trunk" directory. I have used this in the past with unusually organized Subversion trees, and it has been successful. You may need to experiment a bit to get the right combination of options for your situation.

+3
source

You can specify your true trunk with the -T option to git svn clone , as well as -b for your branches and -T for tags. I think for this layout you may need to specify each branch / tag separately, something like this should work for you,

 $ git-svn clone \ -T svn://path/to/trunk/true_trunk \ -b svn://path/to/branches/branch1/true_trunk \ -b svn://path/to/branches/branch1/true_trunk \ -t svn://path/to/tags/tag1/true_trunk \ -t svn://path/to/tags/tag2/true_trunk \ repository_name 

You may need to dump your branches and tags from svn to help format this command

 $ svn ls svn://path/to/tags $ svn ls svn://path/to/branches 
+1
source

All Articles