title: git remote prune origin does not delete the local branch even if its upstream remote branch is deleted
body: <p>This is a common use-case for me, I clone a repository, checkout a branch, do some code changes, make multiple commits, then when it's stable, I do a push to remote, eventually the branch gets merged and deleted, and I'm left with a local branch with upstream gone.</p>
  <p>I was looking for a safe way of deleting all such branches. From the description, it seemed like <code>git remote prune origin</code> is doing this exactly. But it doesn't seem to be working for me.</p>
  <p>Seeing the following behaviour, the branch <code>encrdb_init</code> has been deleted from <code>remote</code> but the <code>git remote prune origin</code> command does not seem to prune it. I am not sure why.</p>
  <pre><code>$ git branch
    bugfix/encrdb_init
    * master
  $
  $ git remote prune origin
  $
  $ git checkout bugfix/encrdb_init
    Switched to branch 'bugfix/encrdb_init'
    Your branch is based on 'origin/bugfix/encrdb_init', but the upstream 
    is gone.
    (use &quot;git branch --unset-upstream&quot; to fixup)
  $
  $ git branch
    bugfix/encrdb_init &lt;&lt;&lt; shouldn't this have been pruned?
    * master
  </code></pre>
  <p>for reference adding output of <code>git remote show origin</code></p>
  <pre><code>$ git remote show origin
  * remote origin
    Fetch URL: &lt;redacted&gt;
    Push  URL: &lt;redacted&gt;
    HEAD branch: master
    Remote branches:
      SSL_test                                                  tracked
      addNodeFix                                                tracked
      autoprefix                                                tracked
      release/1.0.2                                             tracked
    Local branches configured for 'git pull':
      bugfix/encrdb_init          merges with remote bugfix/encrdb_init
      master                      merges with remote master
      release/1.0.2               merges with remote release/1.0.2
    Local refs configured for 'git push':
      master                 pushes to master                 (up to 
  date)
      release/1.0.2          pushes to release/1.0.2          (up to 
  date)
  
  $ git branch -vv
  * bugfix/encrdb_init          341a078c [origin/bugfix/encrdb_init: gone] &lt;redacted comment&gt;`
  </code></pre>