<blockquote>
  <p><strong>See also:</strong> <br/>
  <em><a href="https://stackoverflow.com/questions/4950725">How can I see which Git branches are tracking which remote / upstream branch?</a></em></p>
</blockquote>



<p>How can I find out which remote branch a local branch is tracking?</p>

<p>Do I need to parse <code>git config</code> output, or is there a command that would do this for me?</p>

I use
EasyGit (a.k.a. "eg")
as a super lightweight wrapper on top of (or along side of) Git.  EasyGit has an "info" subcommand that gives you all kinds of super useful information, including the current branches remote tracking branch.  Here's an example (where the current branch name is "foo"):
```
pknotz@s883422: (foo) ~/workspace/bd
$ eg info
Total commits:      175
Local repository: .git
Named remote repositories: (name -> location)
  origin -> git://sahp7577/home/pknotz/bd.git
Current branch: foo
  Cryptographic checksum (sha1sum): bd248d1de7d759eb48e8b5ff3bfb3bb0eca4c5bf
  Default pull/push repository: origin
  Default pull/push options:
    branch.foo.remote = origin
    branch.foo.merge = refs/heads/aal_devel_1
  Number of contributors:        3
  Number of files:       28
  Number of directories:       20
  Biggest file size, in bytes: 32473 (pygooglechart-0.2.0/COPYING)
  Commits:       62
```