git - Mercurial 将补丁复制到存储库

标签 git mercurial repository

我正在使用 Mercurial 存储库,我有一个“git”格式的补丁,我想知道如何将该补丁应用到我当前的本地存储库。

谢谢

最佳答案

hg import <patchfile(s)> 应该能够处理 git 风格的补丁。

使用 hg import --no-commit <patchfile(s)>如果您不希望它在导入每个补丁后自动提交更改。

Mozilla 的常见问题解答提到了这一点:https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_diff_and_patch_files.3f

关于git - Mercurial 将补丁复制到存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2626898/

相关文章:

svn - 有多少人参与了一个项目?基于版本控制系统

templates - TortoiseHG 中的提交消息模板

c# - Entity Framework 以 1-* 关系存储集合大小

asp.net - IQueryable & Repositories - 拿 2 个?

database - 存储库对数据库有隐藏的依赖性吗?

mercurial - 是否可以手动更改/重新排序修订号(假设拓扑保持不变)?

git - 克隆本地 git 存储库,就像我从远程克隆一样

git - Azure DevOps PR 消息 - "Work items only from the first 100 commits will be linked"?

git - checkout 后的意外变化

git - Hg 相当于 git post-receive hook