About diffs and patches: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
Line 1: Line 1:
== Applying a patch ==
= Applying a patch =


* If you want to simply apply a given patch to an original file, the syntax is:
* If you want to simply apply a given patch to an original file, the syntax is:


  patch original_file patch_file
  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

Latest revision as of 19:10, 28 October 2009

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