Git apply skips patches


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:

Skipped patch ‘file.txt’.
Checking patch file.bin…
Applied patch file.bin cleanly.

How can I find out what’s the reason of the skip? As the current message is not very enlightening.


I found out the problem by running patch -p1 < failing.patch which printed:

can’t find file to patch at input line 5

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.

Answered By – Iulian Onofrei

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published