restricting git svn to branches

Using git-svn it is quite beautiful to use my local git as a svn client.

Unfortunately it seems not to be possible to restrict git svn to some branches?

  • .git/config file reads “command not found”
  • How to .gitignore files recursively
  • Deployer - no tty present and no askpass program specified - How to deploy with Deployer
  • Is there a best practice on maintaining thirdparty javascript libraries in Git repo for a Java project (not Node project)?
  • How to connect to a taget server via SSH with a key from a GitLab pipeline?
  • How to manage a boilerplate, and a project built on it with git?
  • got
    One '*' is needed in glob: 'branches/v10'

    when setting up two branches lines in gitconfig with fixed branch paths

    url = https://example.com/svn/reps/test
    fetch = trunk:refs/remotes/trunk
    branches = branches/v10:refs/remotes/v10
    branches = branches/v09:refs/remotes/v09
    

    Is there a way to get around WITHOUT using different SVN remotes (which causes, index will blow up cause branch points are not just “patches/copies” from trunk and all the “trunk” history will come in again ;(


    EDIT:
    To clearify what I intend:
    There is a huge SVN repository with n branches. In SVN, I’ll checkout just two branches in two different workspaces I need to work for.
    In Git, the DVCS aspect will “clone” the whole SVN repository, including ALL informations of ALL SVN branches (think about a repository with > 50.000 changesets).
    I intended to keep the disk usage as small as possible on my local machine.
    Therefore I thought about, set up git for just two specific branches I need (v10 and v09). So I still have the great merge features within this git repository but doesn’t need to clone all the stuff I don’t need (and never will need to).
    Another aspect than “Disc usage” is the problem, that cloning the complete SVN repository takes very, very… (did I say very) long!


  • Git http.proxy Setting
  • Git: merge conflict and commit message
  • git: need to parse commit messages looking for pattern and storing in list
  • GitHub setup for freelance-employer use case?
  • Merge disjoint branches with git
  • How to get total additions and deletions on a given branch for an given author in git
  • One Solution collect form web for “restricting git svn to branches”

    The solution to this is in the manual. At the end of svn manpage, the following comment was found:

    It is also possible to fetch a subset of branches or tags by using a comma-separated list of names within braces. For example:
    [svn-remote "huge-project"]
            url = http://server.org/svn
            fetch = trunk/src:refs/remotes/trunk
            branches = branches/{red,green}/src:refs/remotes/branches/*
            tags = tags/{1.0,2.0}/src:refs/remotes/tags/*
    
    Git Baby is a git and github fan, let's start git clone.