Must have mercurial, the hg-git mercurial extension, and git installed
git init --bare /path/to/git/repo.git
cd /path/to/hg/repo
hg bookmark -r default master
hg push /path/to/git/repo
cd /path/to/git/repo
git config --path core.worktree /path/to/git/repo
git checkout master