title: Git 'fatal: No such ref: HEAD'
body: <p>A weird thing happend to my git repository. When I try to commit something in tortoisegit window I receive all files from project. I cannot revert them, when I pull from server I receive <code>fatal: No such ref: HEAD</code> and <code>fatal: Cannot lock the ref 'HEAD'</code>. All my local branches are missing. Is there any way to resolve the problem?</p>
  
  <p>This is not first commit or something. This thing happend suddenly.</p>
  
  <p>EDIT:</p>
  
  <p><code>git branch -a</code> says: <code>Failed to resolve HEAD as a valid ref</code></p>
  
  <p><code>git status</code> prints all project files marked as new file.</p>
  
  <p>I changed repository folder name for a while, and when I changed it back things were not correct.</p>