About diffs and patches

From Elvanör's Technical Wiki
Revision as of 19:10, 28 October 2009 by Elvanor (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Applying a patch

  • If you want to simply apply a given patch to an original file, the syntax is:
patch original_file patch_file
  • If you want to apply a patch to a directory:
patch -p 0 -i patch_file.diff # 0 is the patch level