在Windows *中如何将Mercurial资源库转换为Git?
有一个Mercurial存储库,我想转换为Git,这是我们在工作中使用的。我安装了Mercurial(Windows),而且我已经在本地克隆了Hg存储库。我坚持尝试转换它。 我发现的大多数页面都假定我使用的是Unix / Linux,而最常见的建议是hg-fast-export,似乎只适用于那些操作系统。我可以访问Git Bash。我已经达到这一点(线条包装更容易阅读): $ ~/codeingit/fast-export/hg-fast-export.sh -r ~/codeinmercurial/projectiwanttoconvert 作为回应,我得到:
我已经阅读了许多关于这个的网页,再次假定我使用的是Unix / Linux,而且我已经安装了Mercurial。 有没有人在Windows上成功将Hg仓库转换为Git,并可以写一个分步指南来做到这一点?
1)
Install Cygwin或
Bash on Windows 10
Cygwin的 >运行setup.exe >单击树顶部的“安装”(“全部”旁边),直到显示“默认” >如果提示您解决依赖关系,请单击下一步 Cygwin安装完成后,打开一个bash shell来运行以下步骤中指定的命令。 bash的快捷方式将被称为Cygwin Terminal。 Windows 10 > Install Bash on Windows 10 > sudo apt install git 2)安装fast-export 打开终端(bash shell)并安装快速导出: git clone git://repo.or.cz/fast-export.git 3)初始化新的git repo并迁移汞回购 mkdir new_git_repo cd new_git_repo git init ../fast-export/hg-fast-export.sh -r /path/to/old/mercurial_repo git checkout HEAD 潜在错误 fatal: Invalid raw date "<devnull@localhost> xxx -xxxx" in ident: <><devnull@localhost> xxx -xxxx 尝试添加“authors.txt”文件,如here所述,其中包含: <>=devnull <devnull@localhost> 命令行现在显示: ../fast-export/hg-fast-export.sh -r /path/to/old/mercurial_repo -A ../fast-export/authors (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- api – 如何使用远程服务器将Skype聊天消息发送到组?
- 如何使用pip在Windows 7上使用MinGW-w64编译器安装软件包?
- 什么是Windows等价的pwd.getpwnam(用户名).pw_dir?
- windows – 如何执行LLMNR查询?
- windows – 按名称批量文件到网络上的MASS ping计算机组,检
- microsoft-dynamics – Dynamics Nav(Navision)webservice
- 如何安装COM DLL的32位和64位版本并“自动选择”?
- 使用Windows API发送HTTP(S)请求
- Microsoft SQL Server 2008 – 日期
- windows – 如何在没有确认的情况下从命令行删除计划任务?