patch cheat

This commit is contained in:
Klaatu 2016-09-04 09:48:01 +12:00
parent 2a6d34de35
commit 32802c2907

13
cheat/cheatsheets/patch Normal file
View File

@ -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