我试图用Git创建一个删除一些.fla和.swf文件的补丁。当我申请时,像这样:
$ patch -p1 < 0001-remove-ckeditor-samples.patch
我收到错误,如下:
patch: **** Only garbage was found in the patch input.
我尝试使用两种不同的方法创建补丁:
git format-patch -1 <sha>
这创建了一个像这样的补丁 - http://pastebin.com/uKHLcCh2 - 失败并出现上述错误。
我也尝试过制作这样的补丁:
git diff <sha> > remove-ckeditor-samples.patch
这给了我一个像这样的补丁:
diff --git a/sites/all/libraries/ckeditor/_samples/assets/output_for_flash.fla b/sites/all/libraries/ckeditor/_samples/assets/output_for_flash.fla
deleted file mode 100644
index 27e68cc..0000000
Binary files a/sites/all/libraries/ckeditor/_samples/assets/output_for_flash.fla and /dev/null differ
diff --git a/sites/all/libraries/ckeditor/_samples/assets/output_for_flash.swf b/sites/all/libraries/ckeditor/_samples/assets/output_for_flash.swf
deleted file mode 100644
index dbe17b6..0000000
Binary files a/sites/all/libraries/ckeditor/_samples/assets/output_for_flash.swf and /dev/null differ
这个也失败了(同样的错误)。是否可以创建一个删除这些文件的补丁?我该怎么做?