问题描述
我正在尝试应用一个补丁,该补丁包含带有git apply
的二进制文件,但仅添加了文件.我尝试运行git apply failing.patch -v
,它会显示类似以下内容的
I'm trying to apply a patch that includes binary files with git apply
but only the files are added. I tried running git apply failing.patch -v
and it prints something like:
我如何找出跳过的原因?由于当前消息不是很有启发性.
How can I find out what's the reason of the skip? As the current message is not very enlightening.
推荐答案
我通过运行打印出的patch -p1 < failing.patch
发现了问题:
I found out the problem by running patch -p1 < failing.patch
which printed:
并提醒我我不在根目录中.
and reminded me that I was not in the root directory.
我不明白为什么没人问过之前,为什么冗长的消息不那么冗长.
I can't understand why no one had asked this before and why is the verbose message not verbose.
此外,甚至官方文档都没有提到跳过和可能的原因.
Also, not even the official documentation mentions skipping and possible causes.
这篇关于Git应用跳过补丁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!