title: How do you remove an invalid remote branch reference from Git?
body: <p>In my current repo I have the following output:</p>
  
  <pre><code>$ git branch -a
  * master
    remotes/origin/master
    remotes/public/master
  </code></pre>
  
  <p>I want to delete <code>remotes/public/master</code> from the branch list:</p>
  
  <pre><code>$ git branch -d remotes/public/master
  error: branch 'remotes/public/master' not found.
  </code></pre>
  
  <p>Also, the output of <code>git remote</code> is strange, since it does not list <code>public</code>:</p>
  
  <pre><code>$ git remote show 
  origin
  </code></pre>
  
  <p><strong>How can I delete 'remotes/public/master' from the branch list?</strong></p>
  
  <p>Update, tried the <code>git push</code> command:</p>
  
  <pre><code>$ git push public :master
  fatal: 'public' does not appear to be a git repository
  fatal: The remote end hung up unexpectedly
  </code></pre>