At my company we have a few Mercurial repositories that we are thinking of converting to Git (we use Windows). I found that there is a python script called fast-export that does the conversion, and also a blog post explaining how to do it on Windows , so I've started converting some repos locally to test.
The problem is that this procedure works perfectly with some of our Mercurial repositories, but not with others. In these cases, what happens is that it fails to execute git checkout HEAD
, with the error message pathspec 'HEAD' did not match any file(s) known to git
.
I don't see any significant difference between repositories for which the procedure works and those for which it doesn't. These are normal Mercurial repositories with a lot of commits and having default , develop , and feature/XXX branches (the latter created with hg flow
).
Any idea what might be going wrong with those repositories?
Well, finally I managed to fix it... using force :
The argument
--force
works the miracle.