title: how to get all branches of my forked git repo
body: <p>I have cloned, pulled and fetched my remote git repo at BitBucket. But I could only get the master branch. My repo at BitBucket has 4 branches:</p>
  
  <ul>
  <li>master</li>
  <li>fix/cleanup</li>
  <li>etc/schema_note</li>
  <li>feature/sampledata</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/YDNSY.png" alt="enter image description here"></p>
  
  <p>I have found the two questions <a href="https://stackoverflow.com/questions/67699/how-to-clone-all-remote-branches-with-git">this</a> and <a href="https://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches">that</a>. I followed some of the instructions in those questions.<br>
  When I tried <code>git branch -a</code>, I could not see the other three branches.</p>
  
  <pre><code>*master  
   remotes/origin/HEAD -&gt; origin/master  
   remotes/origin/master
  </code></pre>
  
  <p>I tried <code>git checkout origin/fix/cleanup</code>. I got an error message.</p>
  
  <blockquote>
    <p>error: pathspec 'origin/fix/cleanup` did not match any file(s) known
    to git.</p>
  </blockquote>
  
  <p>I tried <code>checkout -b</code>, but got another error.</p>
  
  <pre><code>$ git checkout -b fix/cleanup origin/fix/cleanup
  fatal: Cannot update paths and switch to branch 'fix/cleanup' at the same time.
  Did you intend to checkout 'origin/fix/cleanup' which can not be resolved as com
  mit?
  </code></pre>
  
  <p>I also tried to execute the oneliner. </p>
  
  <pre><code>for remote in `git branch -r`; do git branch --track $remote; done
  </code></pre>
  
  <p>But it gave me the new branches <strong>origin/HEAD</strong> and <strong>origin/master</strong> in my local, not for the other 3 branches. What is going on my repo?</p>
  
  <p>I tried <code>git fetch --all</code> and <code>git pull --all</code>. They gave me nothing changed.</p>