Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you use git-svn to clone parts of an SVN repo, but still get all the branches

Tags:

git-svn

Is there any way to use git-svn to clone only some folders of an SVN repo structure. I'm trying to clone a repo that has some crazy big binary files and a number of subfolders that are just plain useless. I've tried using the --ignore-paths option, but my clone seemed to just stall out doing nothing for an extremely long time. Have any of you managed to make --ignore-paths work? I can't find much on the webs where anyone else is running into this. Maybe I'm the only one.

like image 969
kvn Avatar asked Nov 15 '22 07:11

kvn


1 Answers

We've used the "ignore-paths" feature to ignore certain directories in a svn repo:

[svn-remote "svn"]
        ignore-paths = ^(((branches|tags)/[^/]+|trunk)|)(huge/|mobile/)

This config ignores the "huge" and "mobile" subdirs of the repository in trunk, all branches and all tags.

like image 54
Spencer Avatar answered Dec 04 '22 05:12

Spencer