How to use Hg-to-Git tool – fast-export?

I have tried the instructions from this SO post:

cd ~
git clone git://repo.or.cz/fast-export.git
git init git_repo
cd git_repo
~/fast-export/hg-fast-export.sh -r /path/to/old/mercurial_repo
git checkout HEAD

However when doing git checkout HEAD it throws:

  • Continuous Integration Advice?
  • Abort conflicting merge in egit
  • Using gitk to view the full history of a moved file
  • Git: Deleted current branch and lost reflog
  • Understanding git diff on files
  • Programmatically do “Git blame -w” in C#
  • error: pathspec 'HEAD' did not match any file(s) known to git
    

    What is the work-around for this?

    Update:

    I managed to install mercurial-python howen when I try to import still it would not work, the error is:

    Error: No --marks option given
    

    When doing:

    C:\fast-export\hg-fast-export.py -r C:\path\to\repo
    

  • JGit get pulled files
  • GitLab: Can't push code to server?
  • Can I add a username & password to git clone using the --recursive option (for submodules)?
  • Github: How do I pull unmerged upstream pull requests in to my fork?
  • What constitutes a merge conflict in Git?
  • Git Bash(mintty) is extremely slow on my windows 10
  • One Solution collect form web for “How to use Hg-to-Git tool – fast-export?”

    Try running hg-fast-export.sh instead of hg-fast-export.py. It looks like the shell wrapper includes an option for --marks for you.

    Git Baby is a git and github fan, let's start git clone.