title: Remote branch is not showing up in "git branch -r"
body: <p>I have been pushing to a remote Bitbucket repository and recently a colleague has pushed a new branch he created to the same repository.</p>
  
  <p>I'm trying to fetch the changes he uploaded.</p>
  
  <pre><code> $ git branch -a
   * master
   localbranch1
   localbranch2
   remotes/origin/master
  </code></pre>
  
  <blockquote>
    <p>$ git branch -r
    origin/master</p>
  </blockquote>
  
  <p>In the web UI for Bitbucket I can see the branch he has made. How can I do this?</p>
  
  <p>Next try:</p>
  
  <pre><code>$ git fetch bitbucket
  Password for 'https://xxxxx@bitbucket.org':
  From https://bitbucket.org/user/repo
   * branch            HEAD       -&gt; FETCH_HEAD
  </code></pre>
  
  <p>If the branch he created is called <strong>new_branch_b</strong> should I be expecting to see the following?</p>
  
  <pre><code>$ git branch -r
  origin/master
  origin/new_branch_b
  </code></pre>
  
  <p>Third try:</p>
  
  <pre><code>$ git remote update
  Fetching bitbucket
  Password for 'https://xxxxx@bitbucket.org':
  From https://bitbucket.org/user/repo
   * branch            HEAD       -&gt; FETCH_HEAD
  
  $ git branch -r
    origin/master
  </code></pre>
  
  <p>Fourth try:</p>
  
  <pre><code>[remote "bitbucket"]
  url = https://user@bitbucket.org/user/repo.git
  </code></pre>
  
  <p>I called the remote <code>bitbucket</code> rather than origin (at least that's what I recall; I set it up a while ago)</p>
  
  <p>Fifth try:</p>
  
  <p>I updated the Bitbucket remote configuration as per <a href="https://stackoverflow.com/questions/12319968/remote-branch-is-not-showing-up-in-git-branch-r/12320930#12320930">kan's answer</a>:</p>
  
  <blockquote>
    <p>$ git config -e</p>
  </blockquote>
  
  <pre><code>[remote "bitbucket"]
      url = https://user@bitbucket.org/user/repo.git
      fetch = +refs/heads/*:refs/remotes/bitbucket/*
  </code></pre>
  
  <p>For most people it will be called origin:</p>
  
  <pre><code>[remote "origin"]
      url = https://user@bitbucket.org/user/repo.git
      fetch = +refs/heads/*:refs/remotes/origin/*
  </code></pre>
  
  <p>Afterwards,</p>
  
  <pre><code>$ git remote update
  
  Fetching bitbucket
  Password for 'https://user@bitbucket.org':
  remote: Counting objects: 48, done.
  remote: Compressing objects: 100% (32/32), done.
  remote: Total 35 (delta 21), reused 0 (delta 0)
  Unpacking objects: 100% (35/35), done.
  From https://bitbucket.org/user/repo
   * [new branch]      branch_name1 -&gt; origin/branch_name1
   * [new branch]      branch_name2    -&gt; origin/branch_name2
  </code></pre>
  
  <p>.... and so on.</p>
  
  <p>I think <code>git fetch origin</code> would also work for <code>git remote update</code>.</p>