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 rm --cached x” vs “git reset head — x”?
  • Command to get latest git commit hash from a branch
  • Where is git-blame in SourceTree
  • GitHub push error - 'git media update'
  • PHP filtering files and paths according .gitignore
  • How to prevent merge from falling back to normal merge strategy when a fast-forward merge is not possible?
  • got
    One '*' is needed in glob: 'branches/v10'

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

    url =
    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 ;(

    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!

  • How to revert project back to a previous commit in android studio
  • How to create branch and push to server
  • Is Git a good version control system for web development (HTML/CSS/Javascript) on a corporate project?
  • git: updates were rejected because the remote contains work that you do not have locally
  • Git: auto pull from repository?
  • git stash changes apply to new branch?
  • 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 =
            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.