当我尝试使用以下方法执行修补程序时:
git am 0001-someFile.patch
但我得到这个错误:
error: patch failed: src/***/file.c:459 error: src/***/file.c: patch does not apply Patch failed at 0001 someFile.patch When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort".
我正在尝试手动合并冲突使用:
git mergetool --tool=meld
但是我得到:
No files need merging
我怎么解决这个问题? 我得到的文件的名称保存错误,但不知道该行(这是一个大文件)
也许有更好的方法来执行这样的修补?
我负责处理我所有的修补工作。 我曾多次发生过这种情况。 补丁不能合并。 发生这种情况的原因是主分支有修改,修补程序没有考虑到,这阻止了修补正确。 从我的经验来看,这可能是由以下几点引起的:
这是我最成功的流程。 (这是假设这个人正在发展一个除了主人的分支)
这可以确保您的补丁与原始主分支保持同步。 发送该补丁程序,并希望在对主服务器进行太多更改之前应用该补丁程序。
你需要做一个3路合并:
git am -3 0001-someFile.patch git mergetool -t meld