Search code examples
gitpatchgit-patch

git apply fails with "patch does not apply" error


I have a certain patch called my_pcc_branch.patch.

When I try to apply it, I get following message:

$ git apply --check my_pcc_branch.patch
warning: src/main/java/.../AbstractedPanel.java has type 100644, expected 100755
error: patch failed: src/main/java/.../AbstractedPanel.java:13
error: src/main/java/.../AbstractedPanel.java: patch does not apply

What does it mean?

How can I fix this problem?


Solution

  • Johannes Sixt from the [email protected] mailing list suggested using following command line arguments:

    git apply --ignore-space-change --ignore-whitespace mychanges.patch
    

    This solved my problem.