how to use nested branches through git-svn

our svn server has a trunk called Dev and Branches live in


i cloned it with something like git svn clone -T Dev ... -b Branches ...
when I run git branch 2.1 remotes/Release/2.1 i get:
fatal: Not a valid object name: 'remotes/Release/2.1'.

  • When does git refresh the list of remote branches?
  • Git: can't switch to new remote branch
  • Git: is there a quicker way to merge from one branch to multiple branches than doing each one serially?
  • How can I copy the content of a branch to a new local branch?
  • Configuration for GitHub branch restrictions not on GitHub website
  • git submodule update per branch
    • How do I refer to the remote branch?
    • Do I need to re-clone with different args?

  • What is the correct way with NPM to package a BUILT version of a forked Git repository?
  • What is origin/master in git compared to origin master?
  • Should I add the sass source map to my git repo?
  • Updating a bare git repository from a git-svn cloned remote repository
  • Start using Eclipse GIT with an existing project … project files get moved
  • Cannot see upstream branches in git log or gitk
  • One Solution collect form web for “how to use nested branches through git-svn”

    As mentioned in “How do I import svn branches rooted in different directories into git using git-svn?”, you need to grab all the nested branch during the initial import:

    [svn-remote "svn"]
        url = svn://svnserver/repo
        fetch = trunk:refs/remotes/trunk
        branches = branches/*/*:refs/remotes/*
        tags = tags/*:refs/remotes/tags/*

    That is also described in this thread.
    For even more complex SVN branch layout (like branches within trunk!), a modification of the SVN repo might be in order first, before putting in place a git-svn integration.

    Since Git1.6, “1.6.x offers deep cloning so that multiple wildcards can be used with the –branches option”, as mentioned in “Cloning a Non-Standard Svn Repository with Git-Svn”.

    git svn clone web-self-serve --trunk=trunk --branches=branches/*/* --prefix=svn/
    Git Baby is a git and github fan, let's start git clone.