0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

パッチの作成方法

0
Posted at

パッチの作成

$ diff -u 変更前のファイル 変更後のファイル > パッチファイル名

オプションの「-u」はパッチファイルを、unified diff形式で出力するという指定になります。

記載例を次に示します。

$ diff -u file_before.py file_after.py > file_patch.patch

パッチ適用

$ patch -u 変更前のファイル < パッチファイル名

パッチファイルの作成時にオプションの「-u」をつけた場合、パッチ適用時にも「-u」オプションの指定が必要になります。
記載例を次に示します。

$ patch -u file_before.py < file_patch.patch
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?