I try to make a patch as introduced here.
Say I have two directories
pp1(modified version) and
pp0(clean version), I make a patch file
pp0.patch with the
diff -crB pp0 pp1 > pp0.patch
The problem is if there is a file only in pp1, it won't be included into the patch. How to work around it?
I firstly change into the directory of pp0 and test whether the patch will succeed
patch --dry-run -p1 -i /path-to-pp0.patch
Though I've added
--new-file to the
diff command, those only in
pp1 are not listed in the result
I've accidentally patched the wrong file so
diff -crb --new-file pp1 pp0 > pp0.patch
diff -crNb pp1 pp0 > pp0.patch