title: Find out which remote a local branch is tracking
body: <p>This is <em>not</em> <a href="https://stackoverflow.com/questions/171550/find-out-which-remote-branch-a-local-branch-is-tracking">Find out which remote branch a local branch is tracking</a>, If I have mulitple remotes, I might have "master" in all of them.  <code>git branch</code> returns master but I don't know if the master branch I'm on is in remoteFoo or remoteBar.  For example, I might do:</p>
  
  <pre><code>git clone someRepo.git
  cd someRepo
  git remote add anotherRemote otherremoteURL
  </code></pre>
  
  <p>Then <code>git remote</code> shows</p>
  
  <pre><code>someRepo
  anotherRemote
  </code></pre>
  
  <p>I can do <code>git checkout -b master someRepo/master</code> or <code>git checkout -b master anotherRemote/master</code> and <code>git branch</code> will say "master" in both cases.  How do I get back the first part, "someRepo" or "anotherRemote"?</p>
  
  <p>You'd think I could use <code>git remote show</code> but it requires an argument, the name of the remote you want information on.</p>
  
  <pre><code>$ git remote show origin
  fatal: 'origin' does not appear to be a git repository
  fatal: The remote end hung up unexpectedly
  $ git remote show
  someRepo
  anotherRemote
  </code></pre>
  
  <p>With <code>git branch</code> I get an indication of what is current:</p>
  
  <pre><code>$ git branch
    hold
  * master
    old-stuff
    refactor
  </code></pre>
  
  <p>but there's no "*" in <code>git remote</code> output.</p>