title: git-svn - Checkout a remote branch that already exists in svn when my master is already a branch.  Explain this .git/config
body: <p>This is a bit of an oddball question given how the team I've joined is using SVN.  Basically, the svn repository follows a standard layout, but trunk really hasn't been touched in 1.5 years or so and work tends to happen in branches and branches of branches only.  As such, I've used git-svn to clone from the branch that represents the active branch for our next release and that is what master tracks in my local git repository.  Let's call this branch in svn 'release' from here on out.   Using git-svn for this purpose is just hunky dory.</p>
  
  <p>Now, someone has created a feature branch off of 'release', that I'm going to call 'feature', that I'd like to pull down to a local branch of mine, and commit to as well.  Sure, I can get away with just cloning that branch off into another directory/git repository locally, but what I'd really like to do is have 'feature' mirrored in a local branch within my local git repository as well to make merging between the two as straightfoward as possible.  I've seen other stackoverflow.com posts show how this works assuming you've used <code>git svn init</code> with <code>--stdlayout</code>, but I didn't do that in my case for the reasons stated above.</p>
  
  <p>Here is my .git/config</p>
  
  <pre><code>[core]
      repositoryformatversion = 0
      filemode = true
      bare = false
      logallrefupdates = true
  [svn-remote "svn"]
      url = https://our.svn.server/svn/root/branches/release
      fetch = :refs/remotes/git-svn
  </code></pre>
  
  <p>I'm assuming what I need in my <code>[svn-remote]</code> section is a <code>branches = $something</code> but I don't know what that $something is in this case nor what incantation of git checkout and other commands I need after I make that change to .git/config.</p>
  
  <p>Any suggestions?</p>
  
  <hr>
  
  <p><strong>Edit - The following works:</strong></p>
  
  <p>So I started from scratch and did the following clone command:</p>
  
  <p><code>git svn clone <a href="https://my.svn.server/svn/root" rel="noreferrer">https://my.svn.server/svn/root</a> -T branches/branch_I_want_as_master -b branches</code></p>
  
  <p>Which, after about 16 hours, finally pulled everything down that it needed to.  The resultant .git/config looks like this:</p>
  
  <pre><code>[core]
      repositoryformatversion = 0
      filemode = true
      bare = false
      logallrefupdates = true
  [svn-remote "svn"]
      url = https://my.svn.server/svn/root
      fetch = branches/branch_I_want_as_master:refs/remotes/trunk
      branches = branches/*:refs/remotes/*
  </code></pre>
  
  <p>So I know this works - I can <code>git checkout -b name-of-a-branch name-of-a-branch</code> and it gives me the remote branch in my local git repo.   The previous answers weren't the exact answers I needed, but I've upvoted since they were helpful.  </p>
  
  <p>At this point, I'll accept answer that just explains why this works and perhaps a useful link that breaks down how to do things properly with .git/config.  </p>