If I understand correctly, and given that you want to include your new src
directory in the patch, you could call diff -Naur
with a non-existent (or empty) directory as the first parameter:
diff -Naur nonexistent src > src.patch
However, when using this patch file, for example with patch -p0 < src.patch
, the files will be extracted in a directory named "nonexistent".
To make it easier for the receiver, perhaps you could temporarily rename your src
dir to something else, for example:
mv src src-real
diff -Naur src src-real > src.patch
mv src-real src
I don't know if there is a better way...
patch
from there. – MattDMo Jan 16 '14 at 21:47