git cannot apply binary patch *** without full index line

前端 未结 2 1497
逝去的感伤
逝去的感伤 2020-12-13 08:13

When I try to apply a patch from a file, I see

error: cannot apply binary patch to \'my/resource.png\' without full index line
error: my/resource.png: patch does          


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 09:04

    I want to post another way if you have only deleted some files and get the same message. Because I didn't had access to the source code anymore (through reset to another commit), I needed another solution (instead of creating a new patch file).

    Therefore I deleted the following parts from my patch file:

    diff --git a/MyProject/Libraries/some.dll b/MyProject/Libraries/some.dll
    deleted file mode 100644
    index a0908d7..0000000
    Binary files a/MyProject/Libraries/some.dll and /dev/null differ
    diff --git a/MyProject/Libraries/some.dll.mdb b/MyProject/Libraries/some.dll.mdb
    deleted file mode 100644
    index d3c3912..0000000
    Binary files a/MyProject/Libraries/some.dll.mdb and /dev/null differ
    

    Afterwards I could apply my patch file with success! Don't know why he wants to make a binary compare on a deleted file ...

提交回复
热议问题