Create a patch file with diff

The command to create a patch file containing the differences between to folders with the diff command is:

diff -Naur original-source changed-source > patch.txt

Add --exclude=file-or-folder to exclude files or folders from the patch.


-N, --new-file
treat absent files as empty

-a, --text
treat all files as text

-u, -U NUM, --unified[=NUM]
output NUM (default 3) lines of unified context

-r, --recursive
recursively compare any subdirectories found