社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Git

手动修复git am-3冲突

Peter • 3 年前 • 1538 次点击  

有几个类似的问题,但没有一个具体解决这个问题:

我有一个git存储库,它的初始提交添加了项目版本1.0中包含的所有文件,我们称之为 foo .以下所有提交都添加了特定的修改 foo 1.0 。我现在想将对特定子目录所做的更改移植到的另一个版本, foo 2.0 .为此,我首先创建了一个修补程序:

 git format-patch --stdout SOME_COMMIT_ID..HEAD -- subdir > subdir.patch

因为 foo公司 版本之间 1.0 2.0 此修补程序无法干净地应用于 foo 2.0 .没关系,我想手工解决任何冲突。但我怎么能让我这么做呢?常用建议如下:

git am -3 < subdir.patch

应该执行三方合并。但所有这些都会输出一系列错误:

error: patch failed: ...

最终:

It does not apply to blobs recorded in its index.
Patch failed at 0001 commit SOME_COMMIT_ID
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

这对我没有帮助,为什么git不让我手动修复冲突?

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/134693
 
1538 次点击  
文章 [ 1 ]  |  最新文章 3 年前