でパッチを作成してそれから私は別のブランチでgit apply patch.diff
をやってみましたが、私はパッチが適用されませんました。 gitで使用できるdiffファイルからパッチファイルを作成するにはどうすればよいですか?gitのは、私が</p> <pre><code>git diff 13.1_dev sale_edit > patch.diff </code></pre> <p>をやってみました差分
$ git apply --ignore-space-change --ignore-whitespace diff.diff
diff.diff:9: trailing whitespace.
diff.diff:10: trailing whitespace.
function set_change_sale_date()
diff.diff:12: space before tab in indent.
$this->sale_lib->set_change_sale_date($this->input->post('change_sale_date'));
diff.diff:14: trailing whitespace.
diff.diff:15: trailing whitespace.
function set_change_sale_date_enable()
warning: application/controllers/sales.php has type 100755, expected 100644
error: patch failed: application/controllers/sales.php:520
error: application/controllers/sales.php: patch does not apply
warning: application/language/english/sales_lang.php has type 100755, expected 100644
error: patch failed: application/language/english/sales_lang.php:134
error: application/language/english/sales_lang.php: patch does not apply
warning: application/libraries/Sale_lib.php has type 100755, expected 100644
error: patch failed: application/models/sale.php:170
error: application/models/sale.php: patch does not apply
warning: application/views/sales/register.php has type 100755, expected 100644
error: patch failed: application/views/sales/register.php:361
error: application/views/sales/register.php: patch does not apply
を、私は、Mac
Gitは間違ったツールです。 Gitは空白と改行を適切に処理しないので、パッチを適用しようとして何時間も費やすことができます。私は以前、3行のパッチを適用しようとしましたが、それは電子メールで私に送られたものです([Gitを使用しないでGitのファイルにパッチを適用してください](http://stackoverflow.com/q/35353267)) 。 'patch'プログラムを使用してください。空白と行末を処理します。 – jww