what I really want is the mapping between remote SVN branch & local branch.
The answer is: There is none (at least not in the usual sense).
To elaborate:
Normally, in git you have two types of branches
- regular (local) branches
- remote-tracking branches
A local branch can be linked to (and a copy of) a remote-tracking branch (possibly with changes) - then the remote-tracking branch is called the "upstream branch" of the local branch. This "upstream relationship" is stored in the repo config (.git/config), and is visible in the output of git branch -vv
.
Now the thing is: git-svn does not have this concept of an upstream branch.
In particular, it does not store an upstream relationship in the git config, and thus commands like git branch -vv
cannot show it.
git uses the "upstream branch" to decide where to pull from and where to push to (more or less; it's configurable).
git-svn, in contrast, simply goes back in the history of the local branch to the latest commit that came from SVN (the latest commit with a "git-svn-id"). That commit will also name the SVN branch (i.e. path in the SVN repo) that it was created from (it's part of the string after "git-svn-id"). git-svn will then use that SVN branch.
This is described in the git-svn manpage:
Note the following rule: git svn dcommit will attempt to commit on top of the SVN commit named in
git log --grep=^git-svn-id: --first-parent -1
It's not noted in the manual, but I believe that git svn rebase
uses a similar rule.