About diffs and patches

From Elvanör's Technical Wiki
Jump to navigationJump 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