To generate diff between two files the command is:
diff -ru original-file modified-file >patch.diff
# eg: diff -ru script.orig.js script.js > bugfix-1234.diff
If you are using IDEs like Eclipse with SVN plugins, then to generate a diff file, right-click on the file and choose Team
> Create Patch
> Save in File System
(browse to the directory of your choice and give the file a name, say patch.diff
) and click Next
. Choose Selection
and click Finish
.