<work>/postgresql-9.3.5
<orig>/postgresql-9.3.5
diff -urN <orig>/postgresql-9.3.5 <work>/postgresql-9.3.5 > patch_<projectname>.txt where <projectname> is a meaningful abbreviation of your project name.For example, "patch_matviews_15.txt"
<orig>/postgresql-9.3.5
patch -p1 < <path of the patch file>The argument following "p" is the number of leading directory names to be stripped to look for the file.