首先安装fast-export

基本命令:

1
2
3
4
5
6
7
cd somedir
git init .
/path/to/fast-export -r /path/to/hg/repo
git reset HEAD
git checkout .
git remote add origin user@server/repo.git
git push origin master

That’s all!