I am having a little trouble here with git and applying a patch.
I am trying to apply this patch: https://www.drupal.org/node/2309321
To this module: https://www.drupal.org/node/2309089
I know, that those are both Drupal links, but that is not the problem here. You can simply download the module and put the patch in the same folder. No Drupal needed for this.
For reference: I named the patch eck_test.patch
.
This what I have tried so far:
git apply -v eck_test.patch
No output at all.
git apply -v --whitespace fix eck_test.patch
No output at all.
git am eck_test.patch
Patch format detection failed.
I have no idea, why this is not working.
Both line endings are the same, regarding to Sublime Text.
There are a lot of topics about this on the net, but I found none of them working for me. I hope you have some idea, because git seems like, it does not want to help me. :/
patch -p1 --dry-run < eck_test.patch
? Does that show any error? You may need to adjust the level-p...
to 0. If that doesn't show any error, the patch is ok. You can then remove the--dry-run
to apply it. – Gaylpatch
, but aboutgit apply
and why it is behaving so weird. Alsopatch
seems to be unable to create any files. – Mammillapatch -p1
applies fine. – Methodism