title: git: rename local branch failed
body: <p>I don't know why my attempt of renaming local branch failed. I basically cloned the project, then I also have a submodule within the project, and I downloaded the submodule code as well. However, when I use <code>git branch</code> within the submodule, I have:</p>
  
  <pre><code>* (no branch)
    master
  </code></pre>
  
  <p>The code looks like I'm on another branch but the output shows that it doesn't have a name. Then I searched online to find how to rename local branch and I got this:</p>
  
  <pre><code>git branch -m &lt;newname&gt;
  </code></pre>
  
  <p>After I run this command git gave me this error:</p>
  
  <pre><code>error: refname refs/heads/HEAD not found
  fatal: Branch rename failed
  </code></pre>
  
  <p>Anybody know why this happens? Thanks.</p>