Get remote git-svn branch for current local branch

I’m looking for a snippet that will give me the “pseudo-remote” upstream branch used by git-svn for the currently checked out branch.

Let’s say my local repository was cloned from svn with git svn clone -s --prefix=my-svn/ ... and I’m on some local branch topic/foo based on svn branch bar.

  • Git workflow for lone developer (total git newbie)
  • Git cherry pick and lost history
  • Heroku - Git push without building
  • View commands performed by GitHub for Windows Client
  • Is it possible to filter out merged branches in git for-each-ref?
  • I want to merge master and a branch containing completely different data
  • How can I figure out which branch under refs/remotes/ would be updated by a git svn fetch --parent? (Preferrably without hard-coding any layout information configured in the initial clone.)

  • Are you supposed to check-in file in to VCS?
  • `git show` not working: “fatal: Path exists on disk, but not in ”
  • Is there a convention for hotfix releases using git with the Feature Branch workflow?
  • Is there some way to work with git using .NET application?
  • Git keeps asking for password
  • How do I access svn branches using git-svn with a non-standard svn repo layout?
  • One Solution collect form web for “Get remote git-svn branch for current local branch”


    git log --grep git-svn-id: --first-parent -1

    Then query the [svn-remote] section in your .git/config file (use git config) and see which branch the svn-url obtained from the command above corresponds to.

    Git Baby is a git and github fan, let's start git clone.