Print the results of applying the patch without actually making any changes:
$ patch -p1 --dry-run < fix_scary_module.patch
Apply the patch:
$ patch -p1 < fix_scary_module.patch
Create/checkout new branch
git checkout -b [issue-number]-[issue-description]
Add & commit changes
git add .
git commit -m 'The commit msg'
Check the diff
git diff [main branch]
-ex-
git diff 8.x-1.x
Create the patch
git diff [main branch] > [patch_name.patch]