title: git branch -d <branchname> throws error: branch <branchname> not found
body: <p>When I type <code>git branch</code>, I get</p>
  
  <pre><code>* master
  localbranch
  </code></pre>
  
  <p>But when I try to remove the branch, <code>git branch -d localbranch</code>, I get a not found error: </p>
  
  <pre><code>error: branch 'localbranch' not found.
  </code></pre>
  
  <p>I have also tried to force the delete with <code>git branch -D localbranch</code>, but it is giving me the same error.</p>
  
  <p>The branch was corrupted and I did the following procedure, <a href="https://stackoverflow.com/questions/23725925/git-repository-corrupt-incorrect-header-check-loose-object-is-corrupt">Git repository corrupt (incorrect header check; loose object is corrupt)</a>, to remove the corrupted files. But now I cannot delete the branch.</p>