Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 608 Bytes

patch.adoc

File metadata and controls

27 lines (19 loc) · 608 Bytes

Patch

How to use diff

The basic use of diff is
diff -u original.txt modified.txt > file.patch
If you want to use diff against two source tree, the command is
diff -rupN original modified > program.patch

How to use patch

To apply the patch, change into the same directory as the unmodified file and execute
patch < file.patch
This is how to apply patch to an entire directory
patch -p0 < program.patch
Patch applied can be simply removed by adding the -R switch
patch -p0 -R < program.patch
patch -R < file.patch