首页 > 解决方案 > 使用快速导出将 Mercurial (hg) 迁移到 gitlab

问题描述

我在 Debian (7,8,9,10) 上有许多需要迁移到 gitlab 的 mercurial 存储库。我试图在原始 hg repo 所在的同一文件夹中执行此操作。

cd new-git-repo
git init
../../fast-export/hg-fast-export.sh -r . --force
git remote add origin https://github.com/xxx/new-git-repo
git checkout HEAD

但是,这会导致大量未跟踪的文件(所有目录/文件)和已删除的文件。git checkout HEAD 导致错误

error: The following untracked working tree files would be overwritten by checkout:
    .hgignore
    Makefile
    config
    configure/CONFIG

可以就地完成快速导出吗?

非常感谢澄清。

标签: gitgitlabmercurial

解决方案


推荐阅读