Generating the patch:

diff -urp revised_code.php orig_code.php > patch.diff

UPDATE: with svn it’s just:

svn diff > diff.patch

Applying the patch:

patch -p0 < patch.diff

Reference: Using diff to generate patches.




This article was last updated on: 14 Feb 2008