From a terminal...
Patching a Single File
Navigate to your module's directory that contains the changes you have made:
cd /var/www/my-website/sites/all/modules/custom/my_module
Create the patch file by running a diff on your OTHER module file and comparing it to your updated module file:
diff -ruN /var/www/my-OTHER-website/sites/all/modules/custom/my_module/my_module.module my_module.module > my_module.module.patch
Copy the patch file to the same directory as the file that needs to be patched: