2015-10-22 15:31:52 +08:00
|
|
|
# patch
|
2014-10-25 13:20:07 +02:00
|
|
|
|
2014-10-28 20:27:51 +01:00
|
|
|
> Patch a file (or files) with a diff file.
|
|
|
|
> Note that diff files contain both the target filenames and list of changes.
|
2014-10-25 13:20:07 +02:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Apply a patch:
|
2014-10-25 13:20:07 +02:00
|
|
|
|
2016-07-23 01:54:06 +05:30
|
|
|
`patch < {{patch_file}}.diff`
|
2014-10-25 13:20:07 +02:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Apply a patch to current directory:
|
2014-10-25 13:20:07 +02:00
|
|
|
|
2016-07-23 01:54:06 +05:30
|
|
|
`patch -p1 < {{patch_file}}.diff`
|
2014-10-25 13:20:07 +02:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Apply the reverse of a patch:
|
2014-10-25 13:20:07 +02:00
|
|
|
|
2016-07-23 01:54:06 +05:30
|
|
|
`patch -R < {{patch_file}}.diff`
|