好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

将Mercurial项目转换为Git [复制]

参见英文答案 > Converting Mercurial folder to a Git repository                                    7个 我需要将mercurial项目转换为git项目,但我希望保持提交历史不变.我目前的解决方案是删除hg相关文件然后git init&&手动添加我需要的文件,但这不会保留历史记录.这有什么解决方案吗? 您可以尝试使用 fast-export:

cd ~
git clone https://github测试数据/frej/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

另外看看this SO question.

查看更多关于将Mercurial项目转换为Git [复制]的详细内容...

  阅读:21次