25
29

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.

patchコマンドでパッチ適用

Last updated at Posted at 2016-08-22

ファイルの差分を適用するpatchファイルの作成、適用、戻しについて。

patchファイルの作成(差分の書き出し)

diff -u file_old file_new > hoge.patch

-u はunified出力形式のオプション。

patchファイルの適用

patch -u file_path < hoge.patch

変更内容の戻し

patch -R file_path < hoge.patch

省略とかいろいろできるみたいだけど、これが直観的でシンプルかと。

参考)
http://d.hatena.ne.jp/mrgoofy33/20101019/1287500809

25
29
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
25
29

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?