From 32802c2907812226c6b88d7d8a48655242280e6a Mon Sep 17 00:00:00 2001 From: Klaatu Date: Sun, 4 Sep 2016 09:48:01 +1200 Subject: [PATCH] patch cheat --- cheat/cheatsheets/patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cheat/cheatsheets/patch diff --git a/cheat/cheatsheets/patch b/cheat/cheatsheets/patch new file mode 100644 index 0000000..a3485c6 --- /dev/null +++ b/cheat/cheatsheets/patch @@ -0,0 +1,13 @@ +# Patch one file +patch version1 < version.patch + +# Reverse a patch +patch -R version1 < version.patch + +# Patch all files in a directory, adding any missing new files +# -p strips leading slashes +$ cd dir +$ patch -p1 -i ../big.patch + +# Patch files in a directory, with one level (/) offset +patch -p1 -r version1/ < version.patch