Git svn - Clone string while saving path

I am running a local git repository and want to clone a remote SVN connector. This works great, but the trunk / part of the folder is not used. The remote repository is too large to just clone or retrieve everything using branches, etc.

I need the right path for our code verification tool.

How can I make git-svn that only clones a specific trunk / branch but keeps the path intact?

/trunk/folders /branch/folders 

Trunk option selection has a local path

folders

I need it to be

trunk / folders

+4
source share
2 answers

How did i do that

 svn init -T svn://path/to/trunk svn git fetch 

I also used the -r option for git fetch to avoid collecting history from eternity. You can also add back to branches / tags in .git / config, this is described in the git-svn manpage.

0
source
  • (Not sure, but this is the easiest solution) You can simply move the directory folders to a new folder. Git won't mind, and other tools will find the path you want.
  • You can do git svn init svn://path/trunk trunk
  • Also check the --ignore-patch git svn fetch option
0
source

All Articles