git - 使用 TortoiseHG 将 Mercurial 转换为 Git。没有文件被创建
问题描述
我想将 Mercurial 项目转换为 Git 项目。我正在使用 TortoiseHG遵循https://stackoverflow.com/a/34853438/984003的说明。
启用 hggit
打开命令行,输入一个空目录。
git init --bare .git
cd 到您的 Mercurial 存储库。
hg 书签 hg
hg push c:/path/to/your/git/repo
在 Git 目录中: git config --bool core.bare false
在推送命令之后,它说
添加了 5815 个提交,包含 24723 个树和 24178 个 blob
所以发生了一些事情。但是,当我转到 repo 目录(我推送到的路径)时,它是空的,除了 .git
解决方案
@zerkmas 在评论中是对的。
从 c:/path/to/your/git/repo,执行:
git checkout hg
然后所有文件都出现了。
编辑:最后,这对我也没有用。它失去了树枝。
我最终使用了 GitHub 的导入器:
推荐阅读
- javascript - Post 请求 Node.js 和 React 的 CORS 错误
- c++ - 为什么 std::unique_ptr 阻止访问被破坏的对象?
- python - 错误的循环结果 - python
- javascript - NodeJS异步主函数未退出
- c# - 如何在来自 API 的 asp.net MVC 数据上使用 signalR 推送通知
- docker - 在 Windows 10 上安装后 Docker 4 未启动
- spring-security - 如何更改 Spring Security SAML 的默认 SP SSO URL?
- data-mining - 相异矩阵计算
- c++ - 具有多重继承的单例
- python - 带有“使用”装饰器的 peewee 多数据库