I have a git patch with two binary files (it's libraries, newly added). I tried to apply the patches but the binary files are not created. I tried git apply
with the --binary
option. Is there any other option to add the binary files from git patch? I only need the binary files.
The --binary
option is used when you create the patch file, not when you apply it.
That means, instead of your current git diff branch1 branch2 > patch-file
, you have to do this instead: git diff branch1 branch2 --binary > patch-file
. And, then, apply the patch with git apply patch-file
in the same way as you're doing.