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?

  • How to use Git correctly in Android Studio?
  • how to pull updates from remote repo, when filter-branch is used on local repo?
  • Git Private Server what http url to use to clone repository in Visual Studio 2015
  • How do I remove a single file from the staging area of Git but not remove it from the index or undo the changes to the file itself?
  • Git sparse checkout for simple web deployment
  • git trouble via https: routines:SSL23_GET_SERVER_HELLO
  • 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!


  • Magit diff doesn't show characters correctly
  • Working with git from 2 laptops with no bare repo
  • Git checkout file - casing in file name
  • Gitlab - Xcode Can't connect with remote repository
  • Using git push from Qt Creator
  • git pull - will it fetch tags on remote by default?
  • 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.