title: How to solve hg-fast-export error: "Branch name doesn't conform to GIT standards: refs/heads/master"
body: <p>After solving countless problems with the hg-fast-export tool on Windows (from finicky python version needed to cleaning up mercurial repository to satisfy the tool) I have stumbled upon a n error that I cannot solve:</p>
  
  <pre><code>master: Exporting full revision 1/98 with 142/0/0 added/changed/removed files
  fatal: Branch name doesn't conform to GIT standards: refs/heads/master
  fast-import: dumping crash report to .git/fast_import_crash_5956
  Traceback (most recent call last):
    File "../fast-export/hg-fast-export.py", line 388, in &lt;module&gt;
      options.statusfile,authors=a,sob=options.sob,force=options.force))
    File "../fast-export/hg-fast-export.py", line 322, in hg2git
      c=export_commit(ui,repo,rev,old_marks,max,c,authors,sob,brmap)
    File "../fast-export/hg-fast-export.py", line 214, in export_commit
      export_file_contents(ctx,man,added)
    File "../fast-export/hg-fast-export.py", line 126, in export_file_contents
      wr(d)
    File "../fast-export/hg-fast-export.py", line 28, in wr
      print msg
    File "c:\Python26\lib\site-packages\mercurial\windows.py", line 70, in write
      raise IOError(errno.EPIPE, 'Broken pipe')
  IOError: [Errno 32] Broken pipe
  </code></pre>
  
  <p>The error seems to be: <strong>Branch name doesn't conform to GIT standards: refs/heads/master</strong></p>
  
  <p>Does anyone have a clue on how to solve this issue?</p>
  
  <p>My mercurial repository is clean and working properly, with only one head, all nice and hot ready to be exported.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I solved the problem by using TortoiseHG combined with hg-git. For anyone looking for a way to export a mercurial rep. to git or vice-versa, just follow the steps described here: <a href="http://www.ffuts.org/blog/accessing-a-git-repository-with-tortoisehg-on-windows/" rel="nofollow">http://www.ffuts.org/blog/accessing-a-git-repository-with-tortoisehg-on-windows/</a></p>